From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Wed, 12 Jun 2019 08:12:21 +0000 (+0800) Subject: fix: waive charging storage gas for cross-chain (#162) X-Git-Tag: v1.0.5~208^2~40 X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=commitdiff_plain;h=db01c294fbb586e39ef26cd07df8bceb8a0d207e fix: waive charging storage gas for cross-chain (#162) * fix: do not charge storage gas for cross-chain * fix: fix skip-storage-gas attack --- 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 {