@@ -961,8 +961,9 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState& state, const CTransa
961961 // itself can contain sigops MAX_TX_SIGOPS is less than
962962 // MAX_BLOCK_SIGOPS; we still consider this an invalid rather than
963963 // merely non-standard transaction.
964+ unsigned int nSigOps = 0 ;
964965 if (!hasZcSpendInputs) {
965- unsigned int nSigOps = GetLegacySigOpCount (tx);
966+ nSigOps = GetLegacySigOpCount (tx);
966967 unsigned int nMaxSigOps = MAX_TX_SIGOPS_CURRENT;
967968 nSigOps += GetP2SHSigOpCount (tx, view);
968969 if (nSigOps > nMaxSigOps)
@@ -989,7 +990,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState& state, const CTransa
989990 }
990991 }
991992
992- CTxMemPoolEntry entry (tx, nFees, GetTime (), dPriority, chainHeight, pool.HasNoInputsOf (tx), inChainInputValue, fSpendsCoinbaseOrCoinstake );
993+ CTxMemPoolEntry entry (tx, nFees, GetTime (), dPriority, chainHeight, pool.HasNoInputsOf (tx), inChainInputValue, fSpendsCoinbaseOrCoinstake , nSigOps );
993994 unsigned int nSize = entry.GetTxSize ();
994995
995996 // Don't accept it if it can't get into a block
@@ -1226,7 +1227,7 @@ bool AcceptableInputs(CTxMemPool& pool, CValidationState& state, const CTransact
12261227 break ;
12271228 }
12281229 }
1229- CTxMemPoolEntry entry (tx, nFees, GetTime (), dPriority, chainHeight, mempool.HasNoInputsOf (tx), inChainInputValue, fSpendsCoinbaseOrCoinstake );
1230+ CTxMemPoolEntry entry (tx, nFees, GetTime (), dPriority, chainHeight, mempool.HasNoInputsOf (tx), inChainInputValue, fSpendsCoinbaseOrCoinstake , nSigOps );
12301231 unsigned int nSize = entry.GetTxSize ();
12311232
12321233 // Don't accept it if it can't get into a block
0 commit comments