From 2045312bf4b05539691a154b6d74a9d794e31add Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Tue, 16 Oct 2018 19:26:29 +0800 Subject: dex/core: misc bug fixes --- dex/app.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dex/app.go') 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) -- cgit v1.2.3