Page MenuHomePhabricator

D2035.diff
No OneTemporary

D2035.diff

diff --git a/src/validation.cpp b/src/validation.cpp
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -3525,6 +3525,12 @@
// advance our tip, and isn't too many blocks ahead.
bool fAlreadyHave = pindex->nStatus.hasData();
+ // TODO: deal better with return value and error conditions for duplicate
+ // and unrequested blocks.
+ if (fAlreadyHave) {
+ return true;
+ }
+
// Compare block header timestamps and received times of the block and the
// chaintip. If they have the same chain height, use these diffs as a
// tie-breaker, attempting to pick the more honestly-mined block.
@@ -3563,12 +3569,6 @@
// block is in a chain leading to a candidate for best tip, despite not
// being such a candidate itself.
- // TODO: deal better with return value and error conditions for duplicate
- // and unrequested blocks.
- if (fAlreadyHave) {
- return true;
- }
-
// If we didn't ask for it:
if (!fRequested) {
// This is a previously-processed block that was pruned.

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 1, 11:04 (15 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187478
Default Alt Text
D2035.diff (1 KB)

Event Timeline