Merge pull request #652 from nspcc-dev/Fix_FreeGasLimit

core: fix FreeGasLimit constraint
This commit is contained in:
Roman Khimov 2020-02-10 18:49:09 +03:00 committed by GitHub
commit f7749cea67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -547,7 +547,7 @@ func (bc *Blockchain) storeBlock(block *block.Block) error {
v.SetCheckedHash(tx.VerificationHash().BytesBE()) v.SetCheckedHash(tx.VerificationHash().BytesBE())
v.LoadScript(t.Script) v.LoadScript(t.Script)
v.SetPriceGetter(getPrice) v.SetPriceGetter(getPrice)
if bc.config.FreeGasLimit >= 0 { if bc.config.FreeGasLimit > 0 {
v.SetGasLimit(bc.config.FreeGasLimit + t.Gas) v.SetGasLimit(bc.config.FreeGasLimit + t.Gas)
} }