mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Limit variable scope
This commit is contained in:
parent
f259263a7b
commit
90593ed92c
11 changed files with 21 additions and 23 deletions
|
|
@ -838,7 +838,6 @@ UniValue sendrawtransaction(const JSONRPCRequest& request)
|
|||
CTransactionRef tx(MakeTransactionRef(std::move(mtx)));
|
||||
const uint256& hashTx = tx->GetHash();
|
||||
|
||||
bool fLimitFree = true;
|
||||
CAmount nMaxRawTxFee = maxTxFee;
|
||||
if (request.params.size() > 1 && request.params[1].get_bool())
|
||||
nMaxRawTxFee = 0;
|
||||
|
|
@ -851,6 +850,7 @@ UniValue sendrawtransaction(const JSONRPCRequest& request)
|
|||
// push to local node and sync with wallets
|
||||
CValidationState state;
|
||||
bool fMissingInputs;
|
||||
bool fLimitFree = true;
|
||||
if (!AcceptToMemoryPool(mempool, state, std::move(tx), fLimitFree, &fMissingInputs, NULL, false, nMaxRawTxFee)) {
|
||||
if (state.IsInvalid()) {
|
||||
throw JSONRPCError(RPC_TRANSACTION_REJECTED, strprintf("%i: %s", state.GetRejectCode(), state.GetRejectReason()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue