mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 13:47:19 +00:00
core: set gas limit to transaction.SystemFee for all transactions
This commit is contained in:
parent
37164ee4ef
commit
84387b2416
4 changed files with 2 additions and 9 deletions
|
@ -19,7 +19,6 @@ ProtocolConfiguration:
|
|||
- seed5.neo.org:10333
|
||||
VerifyBlocks: true
|
||||
VerifyTransactions: false
|
||||
FreeGasLimit: 10.0
|
||||
MaxTransactionsPerBlock: 500
|
||||
MaxFreeTransactionsPerBlock: 20
|
||||
MaxFreeTransactionSize: 1024
|
||||
|
|
|
@ -19,7 +19,6 @@ ProtocolConfiguration:
|
|||
- seed5t.neo.org:20333
|
||||
VerifyBlocks: true
|
||||
VerifyTransactions: false
|
||||
FreeGasLimit: 10.0
|
||||
MaxTransactionsPerBlock: 500
|
||||
MaxFreeTransactionsPerBlock: 20
|
||||
MaxFreeTransactionSize: 1024
|
||||
|
|
|
@ -2,7 +2,6 @@ package config
|
|||
|
||||
import (
|
||||
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
|
||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||
)
|
||||
|
||||
// ProtocolConfiguration represents the protocol config.
|
||||
|
@ -10,9 +9,7 @@ type (
|
|||
ProtocolConfiguration struct {
|
||||
// FeePerExtraByte sets the expected per-byte fee for
|
||||
// transactions exceeding the MaxFreeTransactionSize.
|
||||
FeePerExtraByte float64 `yaml:"FeePerExtraByte"`
|
||||
// FreeGasLimit is an amount of GAS which can be spent for free.
|
||||
FreeGasLimit util.Fixed8 `yaml:"FreeGasLimit"`
|
||||
FeePerExtraByte float64 `yaml:"FeePerExtraByte"`
|
||||
LowPriorityThreshold float64 `yaml:"LowPriorityThreshold"`
|
||||
Magic netmode.Magic `yaml:"Magic"`
|
||||
MaxTransactionsPerBlock int `yaml:"MaxTransactionsPerBlock"`
|
||||
|
|
|
@ -605,9 +605,7 @@ func (bc *Blockchain) storeBlock(block *block.Block) error {
|
|||
v := SpawnVM(systemInterop)
|
||||
v.LoadScriptWithFlags(tx.Script, smartcontract.All)
|
||||
v.SetPriceGetter(getPrice)
|
||||
if bc.config.FreeGasLimit > 0 {
|
||||
v.GasLimit = bc.config.FreeGasLimit + tx.SystemFee
|
||||
}
|
||||
v.GasLimit = tx.SystemFee
|
||||
|
||||
err := v.Run()
|
||||
if !v.HasFailed() {
|
||||
|
|
Loading…
Reference in a new issue