@@ -1886,7 +1886,7 @@ void CWallet::ReacceptWalletTransactions()
1886
1886
for (const std::pair<const int64_t , CWalletTx*>& item : mapSorted) {
1887
1887
CWalletTx& wtx = *(item.second );
1888
1888
CValidationState state;
1889
- wtx.AcceptToMemoryPool (*locked_chain, maxTxFee, state);
1889
+ wtx.AcceptToMemoryPool (*locked_chain, state);
1890
1890
}
1891
1891
}
1892
1892
@@ -1897,7 +1897,7 @@ bool CWalletTx::RelayWalletTransaction(interfaces::Chain::Lock& locked_chain)
1897
1897
{
1898
1898
CValidationState state;
1899
1899
/* GetDepthInMainChain already catches known conflicts. */
1900
- if (InMempool () || AcceptToMemoryPool (locked_chain, maxTxFee, state)) {
1900
+ if (InMempool () || AcceptToMemoryPool (locked_chain, state)) {
1901
1901
pwallet->WalletLogPrintf (" Relaying wtx %s\n " , GetHash ().ToString ());
1902
1902
if (pwallet->chain ().p2pEnabled ()) {
1903
1903
pwallet->chain ().relayTransaction (GetHash ());
@@ -3180,7 +3180,7 @@ bool CWallet::CommitTransaction(CTransactionRef tx, mapValue_t mapValue, std::ve
3180
3180
if (fBroadcastTransactions )
3181
3181
{
3182
3182
// Broadcast
3183
- if (!wtx.AcceptToMemoryPool (*locked_chain, maxTxFee, state)) {
3183
+ if (!wtx.AcceptToMemoryPool (*locked_chain, state)) {
3184
3184
WalletLogPrintf (" CommitTransaction(): Transaction cannot be broadcast immediately, %s\n " , FormatStateMessage (state));
3185
3185
// TODO: if we expect the failure to be long term or permanent, instead delete wtx from the wallet and return failure.
3186
3186
} else {
@@ -4474,17 +4474,14 @@ bool CMerkleTx::IsImmatureCoinBase(interfaces::Chain::Lock& locked_chain) const
4474
4474
return GetBlocksToMaturity (locked_chain) > 0 ;
4475
4475
}
4476
4476
4477
- bool CWalletTx::AcceptToMemoryPool (interfaces::Chain::Lock& locked_chain, const CAmount& nAbsurdFee, CValidationState& state)
4477
+ bool CWalletTx::AcceptToMemoryPool (interfaces::Chain::Lock& locked_chain, CValidationState& state)
4478
4478
{
4479
- LockAnnotation lock (::cs_main); // Temporary, for AcceptToMemoryPool below. Removed in upcoming commit.
4480
-
4481
4479
// We must set fInMempool here - while it will be re-set to true by the
4482
4480
// entered-mempool callback, if we did not there would be a race where a
4483
4481
// user could call sendmoney in a loop and hit spurious out of funds errors
4484
4482
// because we think that this newly generated transaction's change is
4485
4483
// unavailable as we're not yet aware that it is in the mempool.
4486
- bool ret = ::AcceptToMemoryPool (mempool, state, tx, nullptr /* pfMissingInputs */ ,
4487
- nullptr /* plTxnReplaced */ , false /* bypass_limits */ , nAbsurdFee);
4484
+ bool ret = locked_chain.submitToMemoryPool (tx, pwallet->chain ().maxTxFee (), state);
4488
4485
fInMempool |= ret;
4489
4486
return ret;
4490
4487
}
0 commit comments