diff options
author | bojie <bojie@dexon.org> | 2019-01-29 06:31:01 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:56 +0800 |
commit | 1bfd7ff37aa4c3d135cf2eef52e89b8d4b76daf0 (patch) | |
tree | 4fef73181bd261e95e195f49836013b862e912a6 /dex | |
parent | 495774b3430182e9619b5914172c5f8bac990fa9 (diff) | |
download | dexon-1bfd7ff37aa4c3d135cf2eef52e89b8d4b76daf0.tar dexon-1bfd7ff37aa4c3d135cf2eef52e89b8d4b76daf0.tar.gz dexon-1bfd7ff37aa4c3d135cf2eef52e89b8d4b76daf0.tar.bz2 dexon-1bfd7ff37aa4c3d135cf2eef52e89b8d4b76daf0.tar.lz dexon-1bfd7ff37aa4c3d135cf2eef52e89b8d4b76daf0.tar.xz dexon-1bfd7ff37aa4c3d135cf2eef52e89b8d4b76daf0.tar.zst dexon-1bfd7ff37aa4c3d135cf2eef52e89b8d4b76daf0.zip |
app: prepare/verify block limit in correct round (#181)
Diffstat (limited to 'dex')
-rw-r--r-- | dex/app.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dex/app.go b/dex/app.go index e4fac8c7f..6739ebabb 100644 --- a/dex/app.go +++ b/dex/app.go @@ -219,7 +219,7 @@ func (d *DexconApp) preparePayload(ctx context.Context, position coreTypes.Posit chainID := new(big.Int).SetUint64(uint64(position.ChainID)) chainNums := new(big.Int).SetUint64(uint64(d.gov.GetNumChains(position.Round))) - blockGasLimit := new(big.Int).SetUint64(d.blockchain.CurrentBlock().GasLimit()) + blockGasLimit := new(big.Int).SetUint64(d.gov.DexconConfiguration(position.Round).BlockGasLimit) blockGasUsed := new(big.Int) allTxs := make([]*types.Transaction, 0, 3000) @@ -447,7 +447,7 @@ func (d *DexconApp) VerifyBlock(block *coreTypes.Block) coreTypes.BlockVerifySta } // Validate if balance is enough for TXs in this block. - blockGasLimit := new(big.Int).SetUint64(d.blockchain.CurrentBlock().GasLimit()) + blockGasLimit := new(big.Int).SetUint64(d.gov.DexconConfiguration(block.Position.Round).BlockGasLimit) blockGasUsed := new(big.Int) for _, tx := range transactions { |