Page MenuHomePhabricator

Record when block was fully received

Authored by schancel on Nov 24 2018, 21:06.



As per title. This potentially enables punishment for block withholding
as per Jonathan Toomim's ideas.

Test Plan
make check

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

schancel created this revision.Nov 24 2018, 21:06
Herald added a reviewer: Restricted Project. · View Herald TranscriptNov 24 2018, 21:06
jasonbcox requested changes to this revision.Nov 24 2018, 23:57
jasonbcox added a subscriber: jasonbcox.

This diff never sets the block received time as described in the summary.

100 ↗(On Diff #6079)

Block and header times should be in alphabetical order (swap them)

124 ↗(On Diff #6079)

Swap here too

143 ↗(On Diff #6079)

Swap here too

3726 ↗(On Diff #6079)

This overwrites the header received time, which doesn't seem like the expected behavior at all.

This revision now requires changes to proceed.Nov 24 2018, 23:57
schancel marked 2 inline comments as done.Nov 25 2018, 00:17
schancel added inline comments.
124 ↗(On Diff #6079)

Says who? None of the rest of this stuff is in alphabetical order.

3726 ↗(On Diff #6079)

You are correct sir. Not sure wtf I was doing.

schancel updated this revision to Diff 6082.Nov 25 2018, 00:22

Correctly test BlockReceived time

schancel updated this revision to Diff 6083.Nov 25 2018, 00:42

Update ordering of variables

schancel updated this revision to Diff 6084.Nov 25 2018, 00:43

Update ordering in one more place

jasonbcox accepted this revision.Nov 26 2018, 18:56
This revision is now accepted and ready to land.Nov 26 2018, 18:56
This revision was automatically updated to reflect the committed changes.