mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-10-14 00:59:33 +00:00
[NOD-272] In CheckTransactionSanity, multiply mass limit check by massPerTxByte. (#365)
This commit is contained in:
parent
187c525667
commit
534cb2bf5b
@ -129,7 +129,7 @@ func CheckTransactionSanity(tx *util.Tx, subnetworkID *subnetworkid.SubnetworkID
|
||||
// A transaction must not exceed the maximum allowed block mass when
|
||||
// serialized.
|
||||
serializedTxSize := msgTx.SerializeSize()
|
||||
if serializedTxSize > wire.MaxMassPerBlock {
|
||||
if serializedTxSize*massPerTxByte > wire.MaxMassPerBlock {
|
||||
str := fmt.Sprintf("serialized transaction is too big - got "+
|
||||
"%d, max %d", serializedTxSize, wire.MaxMassPerBlock)
|
||||
return ruleError(ErrTxMassTooHigh, str)
|
||||
|
Loading…
x
Reference in New Issue
Block a user