Browse Source

cmn.PanicSanity is deprecated

pull/1244/head
Anton Kaliaev 7 years ago
parent
commit
87ce804b4a
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      blockchain/pool.go

+ 3
- 2
blockchain/pool.go View File

@ -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


Loading…
Cancel
Save