mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 06:52:36 +01:00
Remove ::fIsBareMultisigStd global
This commit is contained in:
parent
fadc14e4f5
commit
fa2f6c1a61
8 changed files with 7 additions and 4 deletions
|
@ -975,7 +975,6 @@ bool AppInitParameterInteraction(const ArgsManager& args, bool use_syscall_sandb
|
||||||
|
|
||||||
if (!g_wallet_init_interface.ParameterInteraction()) return false;
|
if (!g_wallet_init_interface.ParameterInteraction()) return false;
|
||||||
|
|
||||||
fIsBareMultisigStd = args.GetBoolArg("-permitbaremultisig", DEFAULT_PERMIT_BAREMULTISIG);
|
|
||||||
fAcceptDatacarrier = args.GetBoolArg("-datacarrier", DEFAULT_ACCEPT_DATACARRIER);
|
fAcceptDatacarrier = args.GetBoolArg("-datacarrier", DEFAULT_ACCEPT_DATACARRIER);
|
||||||
nMaxDatacarrierBytes = args.GetIntArg("-datacarriersize", nMaxDatacarrierBytes);
|
nMaxDatacarrierBytes = args.GetIntArg("-datacarriersize", nMaxDatacarrierBytes);
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ struct MemPoolOptions {
|
||||||
/** A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation) */
|
/** A fee rate smaller than this is considered zero fee (for relaying, mining and transaction creation) */
|
||||||
CFeeRate min_relay_feerate{DEFAULT_MIN_RELAY_TX_FEE};
|
CFeeRate min_relay_feerate{DEFAULT_MIN_RELAY_TX_FEE};
|
||||||
CFeeRate dust_relay_feerate{DUST_RELAY_TX_FEE};
|
CFeeRate dust_relay_feerate{DUST_RELAY_TX_FEE};
|
||||||
|
bool permit_bare_multisig{DEFAULT_PERMIT_BAREMULTISIG};
|
||||||
bool require_standard{true};
|
bool require_standard{true};
|
||||||
bool full_rbf{DEFAULT_MEMPOOL_FULL_RBF};
|
bool full_rbf{DEFAULT_MEMPOOL_FULL_RBF};
|
||||||
MemPoolLimits limits{};
|
MemPoolLimits limits{};
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <consensus/amount.h>
|
#include <consensus/amount.h>
|
||||||
#include <logging.h>
|
#include <logging.h>
|
||||||
#include <policy/feerate.h>
|
#include <policy/feerate.h>
|
||||||
|
#include <policy/policy.h>
|
||||||
#include <tinyformat.h>
|
#include <tinyformat.h>
|
||||||
#include <util/error.h>
|
#include <util/error.h>
|
||||||
#include <util/moneystr.h>
|
#include <util/moneystr.h>
|
||||||
|
@ -77,6 +78,8 @@ std::optional<bilingual_str> ApplyArgsManOptions(const ArgsManager& argsman, con
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mempool_opts.permit_bare_multisig = argsman.GetBoolArg("-permitbaremultisig", DEFAULT_PERMIT_BAREMULTISIG);
|
||||||
|
|
||||||
mempool_opts.require_standard = !argsman.GetBoolArg("-acceptnonstdtxn", !chainparams.RequireStandard());
|
mempool_opts.require_standard = !argsman.GetBoolArg("-acceptnonstdtxn", !chainparams.RequireStandard());
|
||||||
if (!chainparams.IsTestChain() && !mempool_opts.require_standard) {
|
if (!chainparams.IsTestChain() && !mempool_opts.require_standard) {
|
||||||
return strprintf(Untranslated("acceptnonstdtxn is not currently supported for %s chain"), chainparams.NetworkIDString());
|
return strprintf(Untranslated("acceptnonstdtxn is not currently supported for %s chain"), chainparams.NetworkIDString());
|
||||||
|
|
|
@ -7,5 +7,4 @@
|
||||||
|
|
||||||
#include <policy/policy.h>
|
#include <policy/policy.h>
|
||||||
|
|
||||||
bool fIsBareMultisigStd = DEFAULT_PERMIT_BAREMULTISIG;
|
|
||||||
unsigned int nBytesPerSigOp = DEFAULT_BYTES_PER_SIGOP;
|
unsigned int nBytesPerSigOp = DEFAULT_BYTES_PER_SIGOP;
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
class CTransaction;
|
class CTransaction;
|
||||||
|
|
||||||
extern unsigned int nBytesPerSigOp;
|
extern unsigned int nBytesPerSigOp;
|
||||||
extern bool fIsBareMultisigStd;
|
|
||||||
|
|
||||||
static inline int64_t GetVirtualTransactionSize(int64_t weight, int64_t sigop_cost)
|
static inline int64_t GetVirtualTransactionSize(int64_t weight, int64_t sigop_cost)
|
||||||
{
|
{
|
||||||
|
|
|
@ -461,6 +461,7 @@ CTxMemPool::CTxMemPool(const Options& opts)
|
||||||
m_incremental_relay_feerate{opts.incremental_relay_feerate},
|
m_incremental_relay_feerate{opts.incremental_relay_feerate},
|
||||||
m_min_relay_feerate{opts.min_relay_feerate},
|
m_min_relay_feerate{opts.min_relay_feerate},
|
||||||
m_dust_relay_feerate{opts.dust_relay_feerate},
|
m_dust_relay_feerate{opts.dust_relay_feerate},
|
||||||
|
m_permit_bare_multisig{opts.permit_bare_multisig},
|
||||||
m_require_standard{opts.require_standard},
|
m_require_standard{opts.require_standard},
|
||||||
m_full_rbf{opts.full_rbf},
|
m_full_rbf{opts.full_rbf},
|
||||||
m_limits{opts.limits}
|
m_limits{opts.limits}
|
||||||
|
|
|
@ -571,6 +571,7 @@ public:
|
||||||
const CFeeRate m_incremental_relay_feerate;
|
const CFeeRate m_incremental_relay_feerate;
|
||||||
const CFeeRate m_min_relay_feerate;
|
const CFeeRate m_min_relay_feerate;
|
||||||
const CFeeRate m_dust_relay_feerate;
|
const CFeeRate m_dust_relay_feerate;
|
||||||
|
const bool m_permit_bare_multisig;
|
||||||
const bool m_require_standard;
|
const bool m_require_standard;
|
||||||
const bool m_full_rbf;
|
const bool m_full_rbf;
|
||||||
|
|
||||||
|
|
|
@ -700,7 +700,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
|
||||||
|
|
||||||
// Rather not work on nonstandard transactions (unless -testnet/-regtest)
|
// Rather not work on nonstandard transactions (unless -testnet/-regtest)
|
||||||
std::string reason;
|
std::string reason;
|
||||||
if (m_pool.m_require_standard && !IsStandardTx(tx, ::fIsBareMultisigStd, m_pool.m_dust_relay_feerate, reason)) {
|
if (m_pool.m_require_standard && !IsStandardTx(tx, m_pool.m_permit_bare_multisig, m_pool.m_dust_relay_feerate, reason)) {
|
||||||
return state.Invalid(TxValidationResult::TX_NOT_STANDARD, reason);
|
return state.Invalid(TxValidationResult::TX_NOT_STANDARD, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue