From 06720dcd6b1a9e292cefdb845936d25ea538e2a9 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 8 Jul 2019 15:57:47 +0400 Subject: [PATCH] add a safety check in ConcurrentProvider#UpdateToHeight --- lite/provider.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lite/provider.go b/lite/provider.go index 6fcb51ad0..8aec819da 100644 --- a/lite/provider.go +++ b/lite/provider.go @@ -136,5 +136,8 @@ func (cp *ConcurrentProvider) UpdateToHeight(chainID string, height int64) error } // Is not the first call, so return the error from previous concurrent calls. + if callback != nil { + panic("expected callback to be nil") + } return pr.err }