Page MenuHomePhabricator

Record when block was fully received
ClosedPublic

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

Details

Summary

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

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
block-received-time (branched from master)
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4107
Build 6285: Bitcoin ABC Buildbot (legacy)
Build 6284: arc lint + arc unit

Event Timeline

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.

src/chain.h
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

src/validation.cpp
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 added inline comments.
src/chain.h
124 ↗(On Diff #6079)

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

src/validation.cpp
3726 ↗(On Diff #6079)

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

Correctly test BlockReceived time

Update ordering of variables

Update ordering in one more place

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