aboutsummaryrefslogtreecommitdiffstats
path: root/dex/app.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-03-19 16:23:44 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:58 +0800
commiteeec5d638dd675827ba9eebedf56ce9860522f55 (patch)
tree417b1b97bcfb002edb5f05438fd8407eeeb63f70 /dex/app.go
parent625bdb6b3ecdd5bed3adb4cd1f8fc0e56ae1f49f (diff)
downloaddexon-eeec5d638dd675827ba9eebedf56ce9860522f55.tar.gz
dexon-eeec5d638dd675827ba9eebedf56ce9860522f55.tar.zst
dexon-eeec5d638dd675827ba9eebedf56ce9860522f55.zip
dex: add block confirme latency (#275)
Diffstat (limited to 'dex/app.go')
-rw-r--r--dex/app.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/dex/app.go b/dex/app.go
index 3f580f12e..9a72d7795 100644
--- a/dex/app.go
+++ b/dex/app.go
@@ -478,6 +478,8 @@ func (d *DexconApp) BlockDelivered(
// BlockConfirmed is called when a block is confirmed.
func (d *DexconApp) BlockConfirmed(block coreTypes.Block) {
+ propBlockConfirmLatency.Update(time.Since(block.Timestamp).Nanoseconds() / 1000)
+
d.appMu.Lock()
defer d.appMu.Unlock()