mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge 9385549a31 into merged_master (Bitcoin PR #20581)
This commit is contained in:
commit
34db56ae3a
12 changed files with 16 additions and 16 deletions
|
|
@ -967,7 +967,7 @@ std::set<BlockFilterType> g_enabled_filter_types;
|
|||
std::terminate();
|
||||
};
|
||||
|
||||
bool AppInitBasicSetup(ArgsManager& args)
|
||||
bool AppInitBasicSetup(const ArgsManager& args)
|
||||
{
|
||||
// ********************************************************* Step 1: setup
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ void InitParameterInteraction(ArgsManager& args);
|
|||
* @note This can be done before daemonization. Do not call Shutdown() if this function fails.
|
||||
* @pre Parameters should be parsed and config file should be read.
|
||||
*/
|
||||
bool AppInitBasicSetup(ArgsManager& args);
|
||||
bool AppInitBasicSetup(const ArgsManager& args);
|
||||
/**
|
||||
* Initialization: parameter interaction.
|
||||
* @note This can be done before daemonization. Do not call Shutdown() if this function fails.
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ bool GetUTXOStats(CCoinsView* view, CCoinsStats& stats, CoinStatsHashType hash_t
|
|||
}
|
||||
|
||||
// The legacy hash serializes the hashBlock
|
||||
static void PrepareHash(CHashWriter& ss, CCoinsStats& stats)
|
||||
static void PrepareHash(CHashWriter& ss, const CCoinsStats& stats)
|
||||
{
|
||||
ss << stats.hashBlock;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ void SignTransaction(CMutableTransaction& mtx, const SigningProvider* keystore,
|
|||
SignTransactionResultToJSON(mtx, complete, coins, input_errors, immature_pegin, result);
|
||||
}
|
||||
|
||||
void SignTransactionResultToJSON(CMutableTransaction& mtx, bool complete, const std::map<COutPoint, Coin>& coins, std::map<int, std::string>& input_errors, bool immature_pegin, UniValue& result)
|
||||
void SignTransactionResultToJSON(CMutableTransaction& mtx, bool complete, const std::map<COutPoint, Coin>& coins, const std::map<int, std::string>& input_errors, bool immature_pegin, UniValue& result)
|
||||
{
|
||||
// Make errors UniValue
|
||||
UniValue vErrors(UniValue::VARR);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class SigningProvider;
|
|||
* @param result JSON object where signed transaction results accumulate
|
||||
*/
|
||||
void SignTransaction(CMutableTransaction& mtx, const SigningProvider* keystore, const std::map<COutPoint, Coin>& coins, const UniValue& hashType, UniValue& result);
|
||||
void SignTransactionResultToJSON(CMutableTransaction& mtx, bool complete, const std::map<COutPoint, Coin>& coins, std::map<int, std::string>& input_errors, bool immature_pegin, UniValue& result);
|
||||
void SignTransactionResultToJSON(CMutableTransaction& mtx, bool complete, const std::map<COutPoint, Coin>& coins, const std::map<int, std::string>& input_errors, bool immature_pegin, UniValue& result);
|
||||
|
||||
/**
|
||||
* Parse a prevtxs UniValue array and get the map of coins from it
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public:
|
|||
return setValid.contains(entry, erase);
|
||||
}
|
||||
|
||||
void Set(uint256& entry)
|
||||
void Set(const uint256& entry)
|
||||
{
|
||||
boost::unique_lock<boost::shared_mutex> lock(cs_sigcache);
|
||||
setValid.insert(entry);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public:
|
|||
}
|
||||
|
||||
// Simulates connection failure so that we can test eviction of offline nodes
|
||||
void SimConnFail(CService& addr)
|
||||
void SimConnFail(const CService& addr)
|
||||
{
|
||||
LOCK(cs);
|
||||
int64_t nLastSuccess = 1;
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
static CDataStream AddrmanToStream(CAddrManSerializationMock& _addrman)
|
||||
static CDataStream AddrmanToStream(const CAddrManSerializationMock& _addrman)
|
||||
{
|
||||
CDataStream ssPeersIn(SER_DISK, CLIENT_VERSION);
|
||||
ssPeersIn << Params().MessageStart();
|
||||
|
|
|
|||
|
|
@ -1861,7 +1861,7 @@ BOOST_AUTO_TEST_CASE(test_Capitalize)
|
|||
BOOST_CHECK_EQUAL(Capitalize("\x00\xfe\xff"), "\x00\xfe\xff");
|
||||
}
|
||||
|
||||
static std::string SpanToStr(Span<const char>& span)
|
||||
static std::string SpanToStr(const Span<const char>& span)
|
||||
{
|
||||
return std::string(span.begin(), span.end());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -525,13 +525,13 @@ private:
|
|||
|
||||
// Run the script checks using our policy flags. As this can be slow, we should
|
||||
// only invoke this on transactions that have otherwise passed policy checks.
|
||||
bool PolicyScriptChecks(ATMPArgs& args, Workspace& ws, PrecomputedTransactionData& txdata) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
bool PolicyScriptChecks(ATMPArgs& args, const Workspace& ws, PrecomputedTransactionData& txdata) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
|
||||
// Re-run the script checks, using consensus flags, and try to cache the
|
||||
// result in the scriptcache. This should be done after
|
||||
// PolicyScriptChecks(). This requires that all inputs either be in our
|
||||
// utxo set or in the mempool.
|
||||
bool ConsensusScriptChecks(ATMPArgs& args, Workspace& ws, PrecomputedTransactionData &txdata) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
bool ConsensusScriptChecks(ATMPArgs& args, const Workspace& ws, PrecomputedTransactionData &txdata) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
|
||||
// Try to add the transaction to the mempool, removing any conflicts first.
|
||||
// Returns true if the transaction is in the mempool after any size
|
||||
|
|
@ -994,7 +994,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool MemPoolAccept::PolicyScriptChecks(ATMPArgs& args, Workspace& ws, PrecomputedTransactionData& txdata)
|
||||
bool MemPoolAccept::PolicyScriptChecks(ATMPArgs& args, const Workspace& ws, PrecomputedTransactionData& txdata)
|
||||
{
|
||||
const CTransaction& tx = *ws.m_ptx;
|
||||
|
||||
|
|
@ -1028,7 +1028,7 @@ bool MemPoolAccept::PolicyScriptChecks(ATMPArgs& args, Workspace& ws, Precompute
|
|||
return true;
|
||||
}
|
||||
|
||||
bool MemPoolAccept::ConsensusScriptChecks(ATMPArgs& args, Workspace& ws, PrecomputedTransactionData& txdata)
|
||||
bool MemPoolAccept::ConsensusScriptChecks(ATMPArgs& args, const Workspace& ws, PrecomputedTransactionData& txdata)
|
||||
{
|
||||
const CTransaction& tx = *ws.m_ptx;
|
||||
const uint256& hash = ws.m_hash;
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ static feebumper::Result CheckFeeRate(const CWallet& wallet, const CWalletTx& wt
|
|||
return feebumper::Result::OK;
|
||||
}
|
||||
|
||||
static CFeeRate EstimateFeeRate(const CWallet& wallet, const CWalletTx& wtx, const CAmount old_fee, CCoinControl& coin_control)
|
||||
static CFeeRate EstimateFeeRate(const CWallet& wallet, const CWalletTx& wtx, const CAmount old_fee, const CCoinControl& coin_control)
|
||||
{
|
||||
// Get the fee rate of the original transaction. This is calculated from
|
||||
// the tx fee/vsize, so it may have been rounded down. Add 1 satoshi to the
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ WalletTx MakeWalletTx(CWallet& wallet, const CWalletTx& wtx)
|
|||
}
|
||||
|
||||
//! Construct wallet tx status struct.
|
||||
WalletTxStatus MakeWalletTxStatus(CWallet& wallet, const CWalletTx& wtx)
|
||||
WalletTxStatus MakeWalletTxStatus(const CWallet& wallet, const CWalletTx& wtx)
|
||||
{
|
||||
WalletTxStatus result;
|
||||
result.block_height = wtx.m_confirm.block_height > 0 ? wtx.m_confirm.block_height : std::numeric_limits<int>::max();
|
||||
|
|
@ -106,7 +106,7 @@ WalletTxStatus MakeWalletTxStatus(CWallet& wallet, const CWalletTx& wtx)
|
|||
}
|
||||
|
||||
//! Construct wallet TxOut struct.
|
||||
WalletTxOut MakeWalletTxOut(CWallet& wallet,
|
||||
WalletTxOut MakeWalletTxOut(const CWallet& wallet,
|
||||
const CWalletTx& wtx,
|
||||
int n,
|
||||
int depth) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue