Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115419
D2035.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D2035.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 11:04 (11 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187478
Default Alt Text
D2035.diff (1 KB)
Attached To
D2035: Fix a bug with duplicate logging
Event Timeline
Log In to Comment