From 534cb2bf5b91629eee31dae121d1f4718958da9c Mon Sep 17 00:00:00 2001 From: stasatdaglabs <39559713+stasatdaglabs@users.noreply.github.com> Date: Thu, 15 Aug 2019 15:05:26 +0300 Subject: [PATCH] [NOD-272] In CheckTransactionSanity, multiply mass limit check by massPerTxByte. (#365) --- blockdag/validate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdag/validate.go b/blockdag/validate.go index a42b7dd0b..16d0025cf 100644 --- a/blockdag/validate.go +++ b/blockdag/validate.go @@ -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)