diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-04-03 16:43:49 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-15 22:09:55 +0800 |
commit | 89aed9c306ea8b1b712bf8e84c1f79b328e19052 (patch) | |
tree | e6f80dd9051bcf773ec8dbf0368426aec6b6f6eb /dex | |
parent | c597b2ff15aefcc73d55a0a3f8c8e0f6e18f083c (diff) | |
download | go-tangerine-89aed9c306ea8b1b712bf8e84c1f79b328e19052.tar go-tangerine-89aed9c306ea8b1b712bf8e84c1f79b328e19052.tar.gz go-tangerine-89aed9c306ea8b1b712bf8e84c1f79b328e19052.tar.bz2 go-tangerine-89aed9c306ea8b1b712bf8e84c1f79b328e19052.tar.lz go-tangerine-89aed9c306ea8b1b712bf8e84c1f79b328e19052.tar.xz go-tangerine-89aed9c306ea8b1b712bf8e84c1f79b328e19052.tar.zst go-tangerine-89aed9c306ea8b1b712bf8e84c1f79b328e19052.zip |
vendor: sync to latest core
Diffstat (limited to 'dex')
-rw-r--r-- | dex/blockproposer.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/dex/blockproposer.go b/dex/blockproposer.go index 0b66a6cc1..8eaeb9761 100644 --- a/dex/blockproposer.go +++ b/dex/blockproposer.go @@ -121,10 +121,12 @@ func (b *blockProposer) syncConsensus() (*dexCore.Consensus, error) { atomic.StoreInt32(&b.syncing, 1) defer atomic.StoreInt32(&b.syncing, 0) + cb := b.dex.blockchain.CurrentBlock() + db := db.NewDatabase(b.dex.chainDb) privkey := coreEcdsa.NewPrivateKeyFromECDSA(b.dex.config.PrivateKey) - consensusSync := syncer.NewConsensus(b.dMoment, b.dex.app, b.dex.governance, - db, b.dex.network, privkey, log.Root()) + consensusSync := syncer.NewConsensus(cb.NumberU64(), b.dMoment, b.dex.app, + b.dex.governance, db, b.dex.network, privkey, log.Root()) // Start the watchCat. b.watchCat.Start() @@ -132,7 +134,6 @@ func (b *blockProposer) syncConsensus() (*dexCore.Consensus, error) { log.Info("Started sync watchCat") // Feed the current block we have in local blockchain. - cb := b.dex.blockchain.CurrentBlock() if cb.NumberU64() > 0 { var block coreTypes.Block if err := rlp.DecodeBytes(cb.Header().DexconMeta, &block); err != nil { |