OSDN Git Service
(root)
/
bytom
/
vapor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b2794c
)
fix: waive charging storage gas for cross-chain (#162)
author
HAOYUatHZ
<37070449+HAOYUatHZ@users.noreply.github.com>
Wed, 12 Jun 2019 08:12:21 +0000
(16:12 +0800)
committer
Paladz
<yzhu101@uottawa.ca>
Wed, 12 Jun 2019 08:12:21 +0000
(16:12 +0800)
* fix: do not charge storage gas for cross-chain
* fix: fix skip-storage-gas attack
protocol/validation/tx.go
patch
|
blob
|
history
diff --git
a/protocol/validation/tx.go
b/protocol/validation/tx.go
index
d7cc42b
..
68bac2e
100644
(file)
--- 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 {