aboutsummaryrefslogtreecommitdiff
path: root/src/protocol.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-11-18 11:23:50 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-11-18 11:23:56 +0100
commita64ff1c4d32c0458660426e4f40b45b8b7c13a87 (patch)
tree97d10b5c1a8ceb7527a441bcb1bac8017708afcb /src/protocol.h
parent54532f46c4e257cde682d492de72cde261998d3f (diff)
parentfa7eed5be704ccdbdce5c9aedb953dd9c8b30446 (diff)
downloadbitcoin-a64ff1c4d32c0458660426e4f40b45b8b7c13a87.tar.xz
Merge #19905: Remove dead CheckForkWarningConditionsOnNewFork
fa7eed5be704ccdbdce5c9aedb953dd9c8b30446 doc: Clarify that vpindexToConnect is in reverse order (MarcoFalke) fa62304c9760f0de9838e56150008816e7a9bacb Remove dead CheckForkWarningConditionsOnNewFork (MarcoFalke) Pull request description: The function has several code and logic bugs, which prevent it from working at all: * `vpindexToConnect.back()` is passed to `CheckForkWarningConditionsOnNewFork`, which is the earliest connected block (least work block), *not* the new fork tip * `ActivateBestChainStep` will never try to connect a block that descends from an invalid block, so the invalid fork will only ever be of height 1, never hitting the 7 block minimum condition Instead of dragging the dead and wrong code around through every change in validation, remove it. In the future it could make sense to add a fork detection somewhere outside of the `ActivateBestChainStep` logic (maybe net_processing). ACKs for top commit: jnewbery: utACK fa7eed5be704ccdbdce5c9aedb953dd9c8b30446 fjahr: Code review ACK fa7eed5be704ccdbdce5c9aedb953dd9c8b30446 glozow: utACK https://github.com/bitcoin/bitcoin/commit/fa7eed5be704ccdbdce5c9aedb953dd9c8b30446 I see that it's dead code Tree-SHA512: 815bdbac7c1eb5b7594b0866a2dbd3c7619797afaadb03a5269fb96739ffb83b05b8e4f7c1e68d48d7886132dd0b12c14c3fb4ee0e72de1074726050ed203e1a
Diffstat (limited to 'src/protocol.h')
0 files changed, 0 insertions, 0 deletions