aboutsummaryrefslogtreecommitdiffstats
path: root/dex
diff options
context:
space:
mode:
authorSonic <sonic@dexon.org>2019-04-24 16:24:20 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-24 16:24:20 +0800
commit32567bdc508391842c97b62abf446987d9827152 (patch)
tree24bfd6f39640a14e833df8170a173fde7c3ee17c /dex
parente4485257292734e22b3844089a3e03393f9eec7f (diff)
downloaddexon-32567bdc508391842c97b62abf446987d9827152.tar
dexon-32567bdc508391842c97b62abf446987d9827152.tar.gz
dexon-32567bdc508391842c97b62abf446987d9827152.tar.bz2
dexon-32567bdc508391842c97b62abf446987d9827152.tar.lz
dexon-32567bdc508391842c97b62abf446987d9827152.tar.xz
dexon-32567bdc508391842c97b62abf446987d9827152.tar.zst
dexon-32567bdc508391842c97b62abf446987d9827152.zip
core, rawdb, dex: improve gov state for syncing (#393)
* core, rawdb, dex: improve gov state for syncing
Diffstat (limited to 'dex')
-rw-r--r--dex/handler.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/dex/handler.go b/dex/handler.go
index fb2ce4e4d..fed1dc8b7 100644
--- a/dex/handler.go
+++ b/dex/handler.go
@@ -588,7 +588,10 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
for _, header := range headers {
if _, exist := snapshotHeight[header.Number.Uint64()]; exist {
+ tt := time.Now()
+ log.Debug("Handler get gov state by hash", "t", tt)
s, err := pm.blockchain.GetGovStateByHash(header.Hash())
+ log.Debug("Handler get gov state by hash", "elapsed", time.Since(tt))
if err != nil {
log.Warn("Get gov state by hash fail", "number", header.Number.Uint64(), "err", err)
return p.SendBlockHeaders(query.Flag, []*types.HeaderWithGovState{})