@@ -77,7 +77,7 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType)
7777 return true ;
7878}
7979
80- bool IsStandardTx (const CTransaction& tx, std::string& reason)
80+ bool IsStandardTx (const CTransaction& tx, bool permit_bare_multisig, const CFeeRate& dust_relay_fee, std::string& reason)
8181{
8282 if (tx.nVersion > CTransaction::MAX_STANDARD_VERSION || tx.nVersion < 1 ) {
8383 reason = " version" ;
@@ -123,10 +123,10 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason)
123123
124124 if (whichType == TX_NULL_DATA)
125125 nDataOut++;
126- else if ((whichType == TX_MULTISIG) && (!fIsBareMultisigStd )) {
126+ else if ((whichType == TX_MULTISIG) && (!permit_bare_multisig )) {
127127 reason = " bare-multisig" ;
128128 return false ;
129- } else if (IsDust (txout, ::dustRelayFee )) {
129+ } else if (IsDust (txout, dust_relay_fee )) {
130130 reason = " dust" ;
131131 return false ;
132132 }
@@ -239,17 +239,17 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
239239 return true ;
240240}
241241
242- int64_t GetVirtualTransactionSize (int64_t nWeight, int64_t nSigOpCost)
242+ int64_t GetVirtualTransactionSize (int64_t nWeight, int64_t nSigOpCost, unsigned int bytes_per_sigop )
243243{
244- return (std::max (nWeight, nSigOpCost * nBytesPerSigOp ) + WITNESS_SCALE_FACTOR - 1 ) / WITNESS_SCALE_FACTOR;
244+ return (std::max (nWeight, nSigOpCost * bytes_per_sigop ) + WITNESS_SCALE_FACTOR - 1 ) / WITNESS_SCALE_FACTOR;
245245}
246246
247- int64_t GetVirtualTransactionSize (const CTransaction& tx, int64_t nSigOpCost)
247+ int64_t GetVirtualTransactionSize (const CTransaction& tx, int64_t nSigOpCost, unsigned int bytes_per_sigop )
248248{
249- return GetVirtualTransactionSize (GetTransactionWeight (tx), nSigOpCost);
249+ return GetVirtualTransactionSize (GetTransactionWeight (tx), nSigOpCost, bytes_per_sigop );
250250}
251251
252- int64_t GetVirtualTransactionInputSize (const CTxIn& txin, int64_t nSigOpCost)
252+ int64_t GetVirtualTransactionInputSize (const CTxIn& txin, int64_t nSigOpCost, unsigned int bytes_per_sigop )
253253{
254- return GetVirtualTransactionSize (GetTransactionInputWeight (txin), nSigOpCost);
254+ return GetVirtualTransactionSize (GetTransactionInputWeight (txin), nSigOpCost, bytes_per_sigop );
255255}
0 commit comments