diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-04-03 16:43:49 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:59 +0800 |
commit | c32e7ba03af9360a7797acdcb5fed2691ef75f9c (patch) | |
tree | b77df67128e9256f43cdf04914619622cefff5a2 /dex | |
parent | 06112b13838a3ec74b4943819d7a16c526c021e8 (diff) | |
download | go-tangerine-c32e7ba03af9360a7797acdcb5fed2691ef75f9c.tar go-tangerine-c32e7ba03af9360a7797acdcb5fed2691ef75f9c.tar.gz go-tangerine-c32e7ba03af9360a7797acdcb5fed2691ef75f9c.tar.bz2 go-tangerine-c32e7ba03af9360a7797acdcb5fed2691ef75f9c.tar.lz go-tangerine-c32e7ba03af9360a7797acdcb5fed2691ef75f9c.tar.xz go-tangerine-c32e7ba03af9360a7797acdcb5fed2691ef75f9c.tar.zst go-tangerine-c32e7ba03af9360a7797acdcb5fed2691ef75f9c.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 { |