forked from TrueCloudLab/neoneo-go
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
|
- seed5.neo.org:10333
|
||||||
VerifyBlocks: true
|
VerifyBlocks: true
|
||||||
VerifyTransactions: false
|
VerifyTransactions: false
|
||||||
FreeGasLimit: 10.0
|
|
||||||
MaxTransactionsPerBlock: 500
|
MaxTransactionsPerBlock: 500
|
||||||
MaxFreeTransactionsPerBlock: 20
|
MaxFreeTransactionsPerBlock: 20
|
||||||
MaxFreeTransactionSize: 1024
|
MaxFreeTransactionSize: 1024
|
||||||
|
|
|
@ -19,7 +19,6 @@ ProtocolConfiguration:
|
||||||
- seed5t.neo.org:20333
|
- seed5t.neo.org:20333
|
||||||
VerifyBlocks: true
|
VerifyBlocks: true
|
||||||
VerifyTransactions: false
|
VerifyTransactions: false
|
||||||
FreeGasLimit: 10.0
|
|
||||||
MaxTransactionsPerBlock: 500
|
MaxTransactionsPerBlock: 500
|
||||||
MaxFreeTransactionsPerBlock: 20
|
MaxFreeTransactionsPerBlock: 20
|
||||||
MaxFreeTransactionSize: 1024
|
MaxFreeTransactionSize: 1024
|
||||||
|
|
|
@ -2,7 +2,6 @@ package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
|
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// ProtocolConfiguration represents the protocol config.
|
// ProtocolConfiguration represents the protocol config.
|
||||||
|
@ -11,8 +10,6 @@ type (
|
||||||
// FeePerExtraByte sets the expected per-byte fee for
|
// FeePerExtraByte sets the expected per-byte fee for
|
||||||
// transactions exceeding the MaxFreeTransactionSize.
|
// transactions exceeding the MaxFreeTransactionSize.
|
||||||
FeePerExtraByte float64 `yaml:"FeePerExtraByte"`
|
FeePerExtraByte float64 `yaml:"FeePerExtraByte"`
|
||||||
// FreeGasLimit is an amount of GAS which can be spent for free.
|
|
||||||
FreeGasLimit util.Fixed8 `yaml:"FreeGasLimit"`
|
|
||||||
LowPriorityThreshold float64 `yaml:"LowPriorityThreshold"`
|
LowPriorityThreshold float64 `yaml:"LowPriorityThreshold"`
|
||||||
Magic netmode.Magic `yaml:"Magic"`
|
Magic netmode.Magic `yaml:"Magic"`
|
||||||
MaxTransactionsPerBlock int `yaml:"MaxTransactionsPerBlock"`
|
MaxTransactionsPerBlock int `yaml:"MaxTransactionsPerBlock"`
|
||||||
|
|
|
@ -605,9 +605,7 @@ func (bc *Blockchain) storeBlock(block *block.Block) error {
|
||||||
v := SpawnVM(systemInterop)
|
v := SpawnVM(systemInterop)
|
||||||
v.LoadScriptWithFlags(tx.Script, smartcontract.All)
|
v.LoadScriptWithFlags(tx.Script, smartcontract.All)
|
||||||
v.SetPriceGetter(getPrice)
|
v.SetPriceGetter(getPrice)
|
||||||
if bc.config.FreeGasLimit > 0 {
|
v.GasLimit = tx.SystemFee
|
||||||
v.GasLimit = bc.config.FreeGasLimit + tx.SystemFee
|
|
||||||
}
|
|
||||||
|
|
||||||
err := v.Run()
|
err := v.Run()
|
||||||
if !v.HasFailed() {
|
if !v.HasFailed() {
|
||||||
|
|
Loading…
Reference in a new issue