diff -uNr a/bitcoin/manifest b/bitcoin/manifest --- a/bitcoin/manifest dc1d0405721e05f48556907247b1817114b7db546f0cee61e4b5955b1f8a9cf8ec606ceadbc6f8f0c59cd6296e2e4fe10605ebe6314b738a483ecee323e5146d +++ b/bitcoin/manifest 25283df35efdf4182533b2e3e7a9353b1ba500f83ac2de72abe3abdb245c84e882afb66643ba7d917e2a8f0b78a84aeb4f3e900fa603be68fd0dfeadcffcac95 @@ -36,3 +36,4 @@ 625543 bitcoin_system_compiler jfw Build system simplification focused on using the system compiler. 688130 bitcoin_dumpblock_no_losers jfw Correct 'dumpblock' to restrict its search to the current best chain, rather than dumping the first matching block by height (which may have lost the mining race and been reorganized away). 696655 bitcoin_help_tuneups jfw Don't hide help for wallet commands based on current encryption state; accept -help for consistency; rewrite inane help for -highs/-lows options; add help for -disablesafemode; make it and -testsafemode use explicit variables for consistency and centricity of options; clarify warning message shown in safe mode and change the political interpretation it offers; fix inept formatting in the parts otherwise touched. +696655 bitcoin_permissive_mode jfw Add -permissive option to disable the potentially isolating effects of the malleus_mikehearnificarum; remove -caneat option, always allowing 'eatblock' which has no need for such childproofing. diff -uNr a/bitcoin/src/bitcoinrpc.cpp b/bitcoin/src/bitcoinrpc.cpp --- a/bitcoin/src/bitcoinrpc.cpp 4b2f744b166ce0a5632bf003bcede45f4c713629b96bc3833942ee534d965ac8c6ebb7faf69fa5a801bfa6089e1034f665fabb6854a051cd76ec1de5dfc10143 +++ b/bitcoin/src/bitcoinrpc.cpp 97976332adfd66270c0b7de06444c9b4ba3eb4805b92357d6c5e3d4452460b6f743d1ccc6370b261c02124c4be6f772b4332d4241da13d761426b80dac27c246 @@ -1802,10 +1802,6 @@ "eatblock \n" "Load a candidate for the next block directly from ."); - if (!fCanEat) - throw runtime_error( - "'eatblock' is only permitted if bitcoind was started with -caneat flag!"); - // path to load block from string filename = params[0].get_str(); diff -uNr a/bitcoin/src/init.cpp b/bitcoin/src/init.cpp --- a/bitcoin/src/init.cpp 2d80ecb71871a017c1dd660af32e31d3c513cbb539a6dacb5eb0f7e939511bc8e49e6a9ebf17a74d66030833b077a264dff10557d1686110cfcd35989f3a8457 +++ b/bitcoin/src/init.cpp e0f55c8b6462c4efd445f7455d2527e7c44c7a9e6db3d2ce3ebcc07a9548a255d385e06aa9780bf7c7dad6e04efa5db61ed643cf84e77176badd92c9a0b6f47f @@ -169,12 +169,12 @@ " -nolisten \t " + _("Don't accept connections from outside\n") + " -banscore= \t " + _("Threshold for disconnecting misbehaving peers (default: 100)\n") + " -bantime= \t " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)\n") + + " -permissive Don't ban peers for sending unrecognized message types.\n" + " -maxreceivebuffer=\t " + _("Maximum per-connection receive buffer, *1000 bytes (default: 10000)\n") + " -maxsendbuffer=\t " + _("Maximum per-connection send buffer, *1000 bytes (default: 10000)\n") + " -paytxfee= \t " + _("Fee per kB to add to transactions you send\n") + " -daemon \t\t " + _("Run in the background as a daemon and accept commands\n") + " -debug \t\t " + _("Output extra debugging information\n") + - " -caneat Permit the use of 'eatblock'\n" + " -verifyall Forbid the skipping of ECDSA signature verification between checkpoints\n" + " -setverstring Set a custom version string\n" + " -setvernum Set a custom version number\n" + @@ -200,12 +200,12 @@ fDebug = GetBoolArg("-debug"); fDaemon = GetBoolArg("-daemon"); - fCanEat = GetBoolArg("-caneat"); fVerifyAll = GetBoolArg("-verifyall"); fHighS = GetBoolArg("-highs"); fLowS = GetBoolArg("-lows"); fTestSafeMode = GetBoolArg("-testsafemode"); /* undocumented */ fDisableSafeMode = GetBoolArg("-disablesafemode"); + fPermissive = GetBoolArg("-permissive"); if (fHighS && fLowS) { diff -uNr a/bitcoin/src/main.cpp b/bitcoin/src/main.cpp --- a/bitcoin/src/main.cpp 29a18b96d96476e66d743a10d5fb59eba97355607bd6d0617015662e7e9fd8403f5a3e862ae08b2af50bdb7d36097885edec4877103746c22b8fadccf30661b0 +++ b/bitcoin/src/main.cpp 11f90e29ae8e63bdbc32ea162791eb29439f61221bbbe69a09068929c9554e0dad22a3cb454d5890e28f1c617d847be6ec9555cb6d09d9c5916760347308c129 @@ -1922,7 +1922,7 @@ pfrom->PushMessage(inv.GetCommand(), (*mi).second); } } - else + else if (!fPermissive) { pfrom->Misbehaving(100); return error("BANNED peer issuing unknown inv type."); @@ -2127,11 +2127,11 @@ } - else + else if (!fPermissive) { - // He who comes to us with a turd, by the turd shall perish. - pfrom->Misbehaving(100); - return error("BANNED peer issuing heathen command."); + // He who comes to us with a turd, by the turd shall perish. + pfrom->Misbehaving(100); + return error("BANNED peer issuing heathen command."); } diff -uNr a/bitcoin/src/util.cpp b/bitcoin/src/util.cpp --- a/bitcoin/src/util.cpp 739febb6ae393a0b2e8715b6615e8b4a604fad45e2e28408b70061e996f3067f7783ad41a94694c3459ce0fde95cfaafc14f5be081a890613147a455a414e23e +++ b/bitcoin/src/util.cpp d0d39dab1148e544ba93766ae80efcf004b715a0af89db3e98f0ea14b842c683f4f1bc6df6182347b36482aacc52c120d7e4beaf6128df44cbbfa4d9b583959d @@ -21,7 +21,6 @@ bool fDebug = false; bool fPrintToConsole = false; bool fPrintToDebugger = false; -bool fCanEat = false; bool fVerifyAll = false; char pszSetDataDir[MAX_PATH] = ""; bool fRequestShutdown = false; @@ -36,6 +35,7 @@ bool fHighS = false; bool fTestSafeMode = false; bool fDisableSafeMode = false; +bool fPermissive = false; std::string CLIENT_NAME(DEFAULT_CLIENT_NAME); diff -uNr a/bitcoin/src/util.h b/bitcoin/src/util.h --- a/bitcoin/src/util.h c5c746c260901943a462709106d44184faf9986a16eec48f130946a62d0e5fa21a63b8be2a5e58906c49a2651d46dfe7accecb241bb1b7df8cda3e2a58876640 +++ b/bitcoin/src/util.h 8201beeab0ac958f021df12bb30a4fcdbdc42151e6516bd7083a6b6c4ff95acad430157196d447a4a5344559ac5f82d96c981b87b9937326e24a2ad0094c9bdd @@ -110,7 +110,6 @@ extern bool fDebug; extern bool fPrintToConsole; extern bool fPrintToDebugger; -extern bool fCanEat; extern bool fVerifyAll; extern char pszSetDataDir[MAX_PATH]; extern bool fRequestShutdown; @@ -126,6 +125,7 @@ extern bool fHighS; extern bool fTestSafeMode; extern bool fDisableSafeMode; +extern bool fPermissive; void RandAddSeed(); void RandAddSeedPerfmon();