From 87ce804b4a11ef1e0172da3747f69af85f9966b6 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 26 Feb 2018 17:33:55 +0400 Subject: [PATCH] cmn.PanicSanity is deprecated --- blockchain/pool.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blockchain/pool.go b/blockchain/pool.go index d0f4d2976..688be0e72 100644 --- a/blockchain/pool.go +++ b/blockchain/pool.go @@ -199,7 +199,7 @@ func (pool *BlockPool) PopRequest() { delete(pool.requesters, pool.height) pool.height++ } else { - cmn.PanicSanity(cmn.Fmt("Expected requester to pop, got nothing at height %v", pool.height)) + panic(fmt.Sprintf("Expected requester to pop, got nothing at height %v", pool.height)) } } @@ -213,8 +213,9 @@ func (pool *BlockPool) RedoRequest(height int64) p2p.ID { request := pool.requesters[height] if request.block == nil { - cmn.PanicSanity("Expected block to be non-nil") + panic("Expected block to be non-nil") } + // RemovePeer will redo all requesters associated with this peer. pool.removePeer(request.peerID) return request.peerID