Request review: drop misbehaving peers



Summary:

In this context, Gavin Andresen is responding to Mike's detailed review. Andresen agrees with Mike's points and decides to simplify the code by adding a -banscore option. If a node accumulates more than -banscore misbehavior points, it will be dropped and banned for -bantime seconds. Andresen also plans to make bad signatures a banning offense. Additionally, Andresen decides to remove the number-of-sigops and non-standard-transaction penalties. To avoid modifying many methods, Andresen used a mutable field with const setter. He believes that a block/transaction's DoS score is metadata and not part of its state. Finally, Andresen agrees to make GetTime() unit-test friendly as suggested by Mike.


Updated on: 2023-06-04T19:43:58.910501+00:00