mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
Rescope g_enable_bip61 to net_processing
This commit is contained in:
parent
3f398d7a17
commit
02bbc05310
@ -1134,8 +1134,6 @@ bool AppInitParameterInteraction()
|
||||
if (gArgs.GetBoolArg("-peerbloomfilters", DEFAULT_PEERBLOOMFILTERS))
|
||||
nLocalServices = ServiceFlags(nLocalServices | NODE_BLOOM);
|
||||
|
||||
g_enable_bip61 = gArgs.GetBoolArg("-enablebip61", DEFAULT_ENABLE_BIP61);
|
||||
|
||||
if (gArgs.GetArg("-rpcserialversion", DEFAULT_RPC_SERIALIZE_VERSION) < 0)
|
||||
return InitError("rpcserialversion must be non-negative.");
|
||||
|
||||
|
@ -37,7 +37,6 @@
|
||||
#endif
|
||||
|
||||
std::atomic<int64_t> nTimeBestReceived(0); // Used only to inform the wallet of when we last received a block
|
||||
bool g_enable_bip61 = DEFAULT_ENABLE_BIP61;
|
||||
|
||||
struct IteratorComparator
|
||||
{
|
||||
@ -74,6 +73,9 @@ static const int HISTORICAL_BLOCK_AGE = 7 * 24 * 60 * 60;
|
||||
|
||||
// Internal stuff
|
||||
namespace {
|
||||
/** Enable BIP61 (sending reject messages) */
|
||||
bool g_enable_bip61 = DEFAULT_ENABLE_BIP61;
|
||||
|
||||
/** Number of nodes with fSyncStarted. */
|
||||
int nSyncStarted = 0;
|
||||
|
||||
@ -811,6 +813,8 @@ static bool BlockRequestAllowed(const CBlockIndex* pindex, const Consensus::Para
|
||||
}
|
||||
|
||||
PeerLogicValidation::PeerLogicValidation(CConnman* connmanIn, CScheduler &scheduler) : connman(connmanIn), m_stale_tip_check_time(0) {
|
||||
g_enable_bip61 = gArgs.GetBoolArg("-enablebip61", DEFAULT_ENABLE_BIP61);
|
||||
|
||||
// Initialize global variables that cannot be constructed at startup.
|
||||
recentRejects.reset(new CRollingBloomFilter(120000, 0.000001));
|
||||
|
||||
|
@ -37,8 +37,6 @@ static constexpr int64_t MINIMUM_CONNECT_TIME = 30;
|
||||
|
||||
/** Default for BIP61 (sending reject messages) */
|
||||
static constexpr bool DEFAULT_ENABLE_BIP61 = true;
|
||||
/** Enable BIP61 (sending reject messages) */
|
||||
extern bool g_enable_bip61;
|
||||
|
||||
class PeerLogicValidation final : public CValidationInterface, public NetEventsInterface {
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user