mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
rpc: Remove index-based Arg accessor
This commit is contained in:
@@ -82,7 +82,7 @@ static RPCHelpMan sendrawtransaction()
|
||||
|
||||
CTransactionRef tx(MakeTransactionRef(std::move(mtx)));
|
||||
|
||||
const CFeeRate max_raw_tx_fee_rate{ParseFeeRate(self.Arg<UniValue>(1))};
|
||||
const CFeeRate max_raw_tx_fee_rate{ParseFeeRate(self.Arg<UniValue>("maxfeerate"))};
|
||||
|
||||
int64_t virtual_size = GetVirtualTransactionSize(*tx);
|
||||
CAmount max_raw_tx_fee = max_raw_tx_fee_rate.GetFee(virtual_size);
|
||||
@@ -162,7 +162,7 @@ static RPCHelpMan testmempoolaccept()
|
||||
"Array must contain between 1 and " + ToString(MAX_PACKAGE_COUNT) + " transactions.");
|
||||
}
|
||||
|
||||
const CFeeRate max_raw_tx_fee_rate{ParseFeeRate(self.Arg<UniValue>(1))};
|
||||
const CFeeRate max_raw_tx_fee_rate{ParseFeeRate(self.Arg<UniValue>("maxfeerate"))};
|
||||
|
||||
std::vector<CTransactionRef> txns;
|
||||
txns.reserve(raw_transactions.size());
|
||||
@@ -873,7 +873,7 @@ static RPCHelpMan submitpackage()
|
||||
}
|
||||
|
||||
// Fee check needs to be run with chainstate and package context
|
||||
const CFeeRate max_raw_tx_fee_rate = ParseFeeRate(self.Arg<UniValue>(1));
|
||||
const CFeeRate max_raw_tx_fee_rate{ParseFeeRate(self.Arg<UniValue>("maxfeerate"))};
|
||||
std::optional<CFeeRate> client_maxfeerate{max_raw_tx_fee_rate};
|
||||
// 0-value is special; it's mapped to no sanity check
|
||||
if (max_raw_tx_fee_rate == CFeeRate(0)) {
|
||||
|
||||
Reference in New Issue
Block a user