aboutsummaryrefslogtreecommitdiffstats
path: root/dex/handler.go
diff options
context:
space:
mode:
authorSonic <sonic@dexon.org>2019-04-24 16:24:20 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-15 22:09:56 +0800
commit633658d48bc8dda138a218cc28ce56067cbb4500 (patch)
tree1411ac86cefe41365d63fa0216e6b505e904a055 /dex/handler.go
parent3669053d5a73a37127ab5d9a7fc23f2e8198f813 (diff)
downloadgo-tangerine-633658d48bc8dda138a218cc28ce56067cbb4500.tar.gz
go-tangerine-633658d48bc8dda138a218cc28ce56067cbb4500.tar.zst
go-tangerine-633658d48bc8dda138a218cc28ce56067cbb4500.zip
core, rawdb, dex: improve gov state for syncing (#393)
* core, rawdb, dex: improve gov state for syncing
Diffstat (limited to 'dex/handler.go')
-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{})