aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-11-01 14:29:31 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-11-01 14:42:08 +0100
commitcffa5ee132f3ef6a8d138eb98d15da2b61999ca4 (patch)
tree76135622e466c313228932d608ec2a04475f4481 /src/httpserver.cpp
parentdb2f83ed463b025e77a5527c3052980f971b8398 (diff)
parentf3d4adfa6ff5db180ec09d93f78cdc8bfda26f96 (diff)
downloadbitcoin-cffa5ee132f3ef6a8d138eb98d15da2b61999ca4.tar.xz
Merge #11531: Check that new headers are not a descendant of an invalid block (more effeciently)
f3d4adf Make p2p-acceptablock not an extended test (Matt Corallo) 00dcda6 [qa] test that invalid blocks on an invalid chain get a disconnect (Matt Corallo) 015a525 Reject headers building on invalid chains by tracking invalidity (Matt Corallo) 932f118 Accept unrequested blocks with work equal to our tip (Matt Corallo) 3d9c70c Stop always storing blocks from whitelisted peers (Matt Corallo) 3b4ac43 Rewrite p2p-acceptblock in preparation for slight behavior changes (Matt Corallo) Pull request description: @sdaftuar pointed out that the version in #11487 was somewhat DoS-able as someone could feed you a valid chain that forked off the the last checkpoint block and force you to do lots of work just walking backwards across blocks for each new block they gave you. We came up with a few proposals but settled on the one implemented here as likely the simplest without obvious DoS issues. It uses our existing on-load mapBlockIndex walk to make sure everything that descends from an invalid block is marked as such, and then simply caches blocks which we attempted to connect but which were found to be invalid. To avoid DoS issues during IBD, this will need to depend on #11458. Includes tests from #11487. Tree-SHA512: 46aff8332908e122dae72ceb5fe8cd241902c2281a87f58a5fb486bf69d46458d84a096fdcb5f3e8e07fbcf7466232b10c429f4d67855425f11b38ac0bf612e1
Diffstat (limited to 'src/httpserver.cpp')
0 files changed, 0 insertions, 0 deletions