aboutsummaryrefslogtreecommitdiffstats
path: root/dex/app.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-16 19:26:29 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:50 +0800
commit2045312bf4b05539691a154b6d74a9d794e31add (patch)
tree9a089f2fc67a3317d8220b40464b4f08a7129632 /dex/app.go
parent06fd0255cd83497c43b6c25aff3be470d0a3c91a (diff)
downloaddexon-2045312bf4b05539691a154b6d74a9d794e31add.tar
dexon-2045312bf4b05539691a154b6d74a9d794e31add.tar.gz
dexon-2045312bf4b05539691a154b6d74a9d794e31add.tar.bz2
dexon-2045312bf4b05539691a154b6d74a9d794e31add.tar.lz
dexon-2045312bf4b05539691a154b6d74a9d794e31add.tar.xz
dexon-2045312bf4b05539691a154b6d74a9d794e31add.tar.zst
dexon-2045312bf4b05539691a154b6d74a9d794e31add.zip
dex/core: misc bug fixes
Diffstat (limited to 'dex/app.go')
-rw-r--r--dex/app.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/dex/app.go b/dex/app.go
index 35a771460..85d7ea621 100644
--- a/dex/app.go
+++ b/dex/app.go
@@ -308,11 +308,12 @@ func (d *DexconApp) BlockDelivered(blockHash coreCommon.Hash, result coreTypes.F
_, err = d.blockchain.InsertChain(
[]*types.Block{types.NewBlock(&types.Header{
- ParentHash: common.Hash(block.ParentHash),
+ ParentHash: d.blockchain.CurrentBlock().Hash(),
Number: new(big.Int).SetUint64(result.Height),
- Time: new(big.Int).SetInt64(result.Timestamp.Unix()),
+ Time: big.NewInt(result.Timestamp.Unix()),
TxHash: types.DeriveSha(transactions),
Coinbase: common.BytesToAddress(block.ProposerID.Hash[:]),
+ GasLimit: 800000,
}, transactions, nil, nil)})
if err != nil {
log.Error("insert chain", "error", err)