From db01c294fbb586e39ef26cd07df8bceb8a0d207e Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Wed, 12 Jun 2019 16:12:21 +0800 Subject: [PATCH] fix: waive charging storage gas for cross-chain (#162) * fix: do not charge storage gas for cross-chain * fix: fix skip-storage-gas attack --- protocol/validation/tx.go | 1 + 1 file changed, 1 insertion(+) diff --git a/protocol/validation/tx.go b/protocol/validation/tx.go index d7cc42b5..68bac2ea 100644 --- a/protocol/validation/tx.go +++ b/protocol/validation/tx.go @@ -255,6 +255,7 @@ func checkValid(vs *validationState, e bc.Entry) (err error) { if err = checkValidDest(&vs2, e.WitnessDestination); err != nil { return errors.Wrap(err, "checking cross-chain input destination") } + vs.gasStatus.StorageGas = 0 case *bc.Spend: if e.SpentOutputId == nil { -- 2.11.0