Treat high-sigop transactions as larger rather than rejecting them
This commit is contained in:
@@ -154,12 +154,14 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
|
||||
return true;
|
||||
}
|
||||
|
||||
int64_t GetVirtualTransactionSize(int64_t nWeight)
|
||||
unsigned int nBytesPerSigOp = DEFAULT_BYTES_PER_SIGOP;
|
||||
|
||||
int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost)
|
||||
{
|
||||
return (nWeight + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR;
|
||||
return (std::max(nWeight, nSigOpCost * nBytesPerSigOp) + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR;
|
||||
}
|
||||
|
||||
int64_t GetVirtualTransactionSize(const CTransaction& tx)
|
||||
int64_t GetVirtualTransactionSize(const CTransaction& tx, int64_t nSigOpCost)
|
||||
{
|
||||
return GetVirtualTransactionSize(GetTransactionWeight(tx));
|
||||
return GetVirtualTransactionSize(GetTransactionWeight(tx), nSigOpCost);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user