Remove unneeded feerate param from RelayTransaction/AcceptToMemoryPool.
This commit is contained in:
committed by
lateminer
parent
16b0e12385
commit
89655c3a1e
@@ -882,12 +882,11 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
|
||||
const CCoins* existingCoins = view.AccessCoins(hashTx);
|
||||
bool fHaveMempool = mempool.exists(hashTx);
|
||||
bool fHaveChain = existingCoins && existingCoins->nHeight < 1000000000;
|
||||
CFeeRate txFeeRate = CFeeRate(0);
|
||||
if (!fHaveMempool && !fHaveChain) {
|
||||
// push to local node and sync with wallets
|
||||
CValidationState state;
|
||||
bool fMissingInputs;
|
||||
if (!AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, &txFeeRate, false, nMaxRawTxFee)) {
|
||||
if (!AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, false, nMaxRawTxFee)) {
|
||||
if (state.IsInvalid()) {
|
||||
throw JSONRPCError(RPC_TRANSACTION_REJECTED, strprintf("%i: %s", state.GetRejectCode(), state.GetRejectReason()));
|
||||
} else {
|
||||
@@ -900,7 +899,7 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
|
||||
} else if (fHaveChain) {
|
||||
throw JSONRPCError(RPC_TRANSACTION_ALREADY_IN_CHAIN, "transaction already in block chain");
|
||||
}
|
||||
RelayTransaction(tx, txFeeRate);
|
||||
RelayTransaction(tx);
|
||||
|
||||
return hashTx.GetHex();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user