diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-16 19:26:29 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | 88b272df86618979916a2b9f45723745dd556245 (patch) | |
tree | 7e33b4753e3920e65361991d695aeb1cadba92d1 /dex/app.go | |
parent | 0c555d3f347dc8458ddae614b093c9b11d54e629 (diff) | |
download | dexon-88b272df86618979916a2b9f45723745dd556245.tar dexon-88b272df86618979916a2b9f45723745dd556245.tar.gz dexon-88b272df86618979916a2b9f45723745dd556245.tar.bz2 dexon-88b272df86618979916a2b9f45723745dd556245.tar.lz dexon-88b272df86618979916a2b9f45723745dd556245.tar.xz dexon-88b272df86618979916a2b9f45723745dd556245.tar.zst dexon-88b272df86618979916a2b9f45723745dd556245.zip |
dex/core: misc bug fixes
Diffstat (limited to 'dex/app.go')
-rw-r--r-- | dex/app.go | 5 |
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) |