@@ -1005,7 +1005,7 @@ std::string FormatStateMessage(const CValidationState &state)
1005
1005
}
1006
1006
1007
1007
bool AcceptToMemoryPoolWorker (CTxMemPool& pool, CValidationState& state, const CTransaction& tx, bool fLimitFree ,
1008
- bool * pfMissingInputs, CFeeRate* txFeeRate, bool fOverrideMempoolLimit , const CAmount& nAbsurdFee,
1008
+ bool * pfMissingInputs, bool fOverrideMempoolLimit , const CAmount& nAbsurdFee,
1009
1009
std::vector<uint256>& vHashTxnToUncache)
1010
1010
{
1011
1011
const uint256 hash = tx.GetHash ();
@@ -1170,9 +1170,6 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
1170
1170
1171
1171
CTxMemPoolEntry entry (tx, nFees, GetTime (), dPriority, chainActive.Height (), pool.HasNoInputsOf (tx), inChainInputValue, fSpendsCoinbase , nSigOps, lp);
1172
1172
unsigned int nSize = entry.GetTxSize ();
1173
- if (txFeeRate) {
1174
- *txFeeRate = CFeeRate (nFees, nSize);
1175
- }
1176
1173
1177
1174
// Check that the transaction doesn't have an excessive number of
1178
1175
// sigops, making it impossible to mine. Since the coinbase transaction
@@ -1421,10 +1418,10 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
1421
1418
}
1422
1419
1423
1420
bool AcceptToMemoryPool (CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree ,
1424
- bool * pfMissingInputs, CFeeRate* txFeeRate, bool fOverrideMempoolLimit , const CAmount nAbsurdFee)
1421
+ bool * pfMissingInputs, bool fOverrideMempoolLimit , const CAmount nAbsurdFee)
1425
1422
{
1426
1423
std::vector<uint256> vHashTxToUncache;
1427
- bool res = AcceptToMemoryPoolWorker (pool, state, tx, fLimitFree , pfMissingInputs, txFeeRate, fOverrideMempoolLimit , nAbsurdFee, vHashTxToUncache);
1424
+ bool res = AcceptToMemoryPoolWorker (pool, state, tx, fLimitFree , pfMissingInputs, fOverrideMempoolLimit , nAbsurdFee, vHashTxToUncache);
1428
1425
if (!res) {
1429
1426
BOOST_FOREACH (const uint256& hashTx, vHashTxToUncache)
1430
1427
pcoinsTip->Uncache (hashTx);
@@ -2651,7 +2648,7 @@ bool static DisconnectTip(CValidationState& state, const CChainParams& chainpara
2651
2648
// ignore validation errors in resurrected transactions
2652
2649
list<CTransaction> removed;
2653
2650
CValidationState stateDummy;
2654
- if (tx.IsCoinBase () || !AcceptToMemoryPool (mempool, stateDummy, tx, false , NULL , NULL , true )) {
2651
+ if (tx.IsCoinBase () || !AcceptToMemoryPool (mempool, stateDummy, tx, false , NULL , true )) {
2655
2652
mempool.removeRecursive (tx, removed);
2656
2653
} else if (mempool.exists (tx.GetHash ())) {
2657
2654
vHashUpdate.push_back (tx.GetHash ());
@@ -4956,10 +4953,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
4956
4953
pfrom->setAskFor .erase (inv.hash );
4957
4954
mapAlreadyAskedFor.erase (inv.hash );
4958
4955
4959
- CFeeRate txFeeRate = CFeeRate (0 );
4960
- if (!AlreadyHave (inv) && AcceptToMemoryPool (mempool, state, tx, true , &fMissingInputs , &txFeeRate)) {
4956
+ if (!AlreadyHave (inv) && AcceptToMemoryPool (mempool, state, tx, true , &fMissingInputs )) {
4961
4957
mempool.check (pcoinsTip);
4962
- RelayTransaction (tx, txFeeRate );
4958
+ RelayTransaction (tx);
4963
4959
vWorkQueue.push_back (inv.hash );
4964
4960
4965
4961
LogPrint (" mempool" , " AcceptToMemoryPool: peer=%d: accepted %s (poolsz %u txn, %u kB)\n " ,
@@ -4990,10 +4986,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
4990
4986
4991
4987
if (setMisbehaving.count (fromPeer))
4992
4988
continue ;
4993
- CFeeRate orphanFeeRate = CFeeRate (0 );
4994
- if (AcceptToMemoryPool (mempool, stateDummy, orphanTx, true , &fMissingInputs2 , &orphanFeeRate)) {
4989
+ if (AcceptToMemoryPool (mempool, stateDummy, orphanTx, true , &fMissingInputs2 )) {
4995
4990
LogPrint (" mempool" , " accepted orphan tx %s\n " , orphanHash.ToString ());
4996
- RelayTransaction (orphanTx, orphanFeeRate );
4991
+ RelayTransaction (orphanTx);
4997
4992
vWorkQueue.push_back (orphanHash);
4998
4993
vEraseQueue.push_back (orphanHash);
4999
4994
}
@@ -5046,7 +5041,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
5046
5041
int nDoS = 0 ;
5047
5042
if (!state.IsInvalid (nDoS) || nDoS == 0 ) {
5048
5043
LogPrintf (" Force relaying tx %s from whitelisted peer=%d\n " , tx.GetHash ().ToString (), pfrom->id );
5049
- RelayTransaction (tx, txFeeRate );
5044
+ RelayTransaction (tx);
5050
5045
} else {
5051
5046
LogPrintf (" Not relaying invalid transaction %s from whitelisted peer=%d (%s)\n " , tx.GetHash ().ToString (), pfrom->id , FormatStateMessage (state));
5052
5047
}
0 commit comments