mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Merge #15437: p2p: Remove BIP61 reject messages
fa25f43ac5p2p: Remove BIP61 reject messages (MarcoFalke) Pull request description: Reject messages (BIP 61) appear in the following settings: * Parsing of reject messages (in case `-debug=net` is set, off by default). This has only been used for a single `LogPrint` call for several releases now. Such logging is completely meaningless to us and should thus be removed. * The sending of reject messages (in case `-enablebip61` is set, off by default). This can be used to debug a node that is under our control. Instead of hacking this debugging into the p2p protocol, it could be more easily achieved by parsing the debug log. (Use `-printtoconsole` to have it as stream, or read from the `debug.log` file like our python function `assert_debug_log` in the test framework does) Having to maintain all of this logic and code to accommodate debugging, which can be achieved by other means a lot easier, is a burden. It makes review on net processing changes a lot harder, since the reject message logic has to be carried around without introducing any errors or DOS vectors. ACKs for top commit: jnewbery: utACKfa25f43ac5laanwj: I'm still not 100% convinced that I like getting rid of BIP61 conceptually, but apparently everyone wants it, code review ACKfa25f43ac5. ryanofsky: Code review ACKfa25f43ac5Tree-SHA512: daf55254202925e56be3d6cfb3c1c804e7a82cecb1dd1e5bd7b472bae989fd68ac4f21ec53fc46751353056fd645f7f877bebcb0b40920257991423a3d99e0be
This commit is contained in:
@@ -78,7 +78,7 @@ BOOST_FIXTURE_TEST_SUITE(denialofservice_tests, TestingSetup)
|
||||
BOOST_AUTO_TEST_CASE(outbound_slow_chain_eviction)
|
||||
{
|
||||
auto connman = MakeUnique<CConnman>(0x1337, 0x1337);
|
||||
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), nullptr, scheduler, false);
|
||||
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), nullptr, scheduler);
|
||||
|
||||
// Mock an outbound peer
|
||||
CAddress addr1(ip(0xa0b0c001), NODE_NONE);
|
||||
@@ -148,7 +148,7 @@ static void AddRandomOutboundPeer(std::vector<CNode *> &vNodes, PeerLogicValidat
|
||||
BOOST_AUTO_TEST_CASE(stale_tip_peer_management)
|
||||
{
|
||||
auto connman = MakeUnique<CConnmanTest>(0x1337, 0x1337);
|
||||
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), nullptr, scheduler, false);
|
||||
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), nullptr, scheduler);
|
||||
|
||||
const Consensus::Params& consensusParams = Params().GetConsensus();
|
||||
constexpr int max_outbound_full_relay = 8;
|
||||
@@ -221,7 +221,7 @@ BOOST_AUTO_TEST_CASE(DoS_banning)
|
||||
{
|
||||
auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
|
||||
auto connman = MakeUnique<CConnman>(0x1337, 0x1337);
|
||||
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), scheduler, false);
|
||||
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), scheduler);
|
||||
|
||||
banman->ClearBanned();
|
||||
CAddress addr1(ip(0xa0b0c001), NODE_NONE);
|
||||
@@ -276,7 +276,7 @@ BOOST_AUTO_TEST_CASE(DoS_banscore)
|
||||
{
|
||||
auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
|
||||
auto connman = MakeUnique<CConnman>(0x1337, 0x1337);
|
||||
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), scheduler, false);
|
||||
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), scheduler);
|
||||
|
||||
banman->ClearBanned();
|
||||
gArgs.ForceSetArg("-banscore", "111"); // because 11 is my favorite number
|
||||
@@ -323,7 +323,7 @@ BOOST_AUTO_TEST_CASE(DoS_bantime)
|
||||
{
|
||||
auto banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
|
||||
auto connman = MakeUnique<CConnman>(0x1337, 0x1337);
|
||||
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), scheduler, false);
|
||||
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), banman.get(), scheduler);
|
||||
|
||||
banman->ClearBanned();
|
||||
int64_t nStartTime = GetTime();
|
||||
|
||||
Reference in New Issue
Block a user