diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-10-28 11:11:23 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-10-28 11:19:38 -0700 |
commit | ba216b5fa63e7e6cae847d1e3621f5c54840f898 (patch) | |
tree | 17e75153d56aa4425b5a1fc9af5bd348f69c9d9e /src/tinyformat.h | |
parent | b5545d8df99fb71bbb627eebe623ff8d9a2d9719 (diff) | |
parent | 37886d5e2f9992678dea4b1bd893f4f10d61d3ad (diff) | |
download | bitcoin-ba216b5fa63e7e6cae847d1e3621f5c54840f898.tar.xz |
Merge #11568: Disconnect outbound peers on invalid chains
37886d5e2 Disconnect outbound peers relaying invalid headers (Suhas Daftuar)
4637f1852 moveonly: factor out headers processing into separate function (Suhas Daftuar)
Pull request description:
Alternate to #11446.
Disconnect outbound (non-manual) peers that serve us block headers that are already known to be invalid, but exempt compact block announcements from such disconnects.
We restrict disconnection to outbound peers that are using up an outbound connection slot, because we rely on those peers to give us connectivity to the honest network (our inbound peers are not chosen by us and hence could all be from an attacker/sybil). Maintaining connectivity to peers that serve us invalid headers is sometimes desirable, eg after a soft-fork, to protect unupgraded software from being partitioned off the honest network, so we prefer to only disconnect when necessary.
Compact block announcements are exempted from this logic to comply with BIP 152, which explicitly permits nodes to relay compact blocks before fully validating them.
Tree-SHA512: 3ea88e4ccc1184f292a85b17f800d401d2c3806fefc7ad5429d05d6872c53acfa5751e3df83ce6b9c0060ab289511ed70ae1323d140ccc5b12e3c8da6de49936
Diffstat (limited to 'src/tinyformat.h')
0 files changed, 0 insertions, 0 deletions