From dc27d56cc3ac6c804e63f16b75d26f60a8d0ba6e Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Sun, 12 Apr 2015 18:19:52 -0700 Subject: [PATCH] minor fix for when the blockstore is ahead by one. --- blockchain/reactor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blockchain/reactor.go b/blockchain/reactor.go index 7a213b0f..d9fe3863 100644 --- a/blockchain/reactor.go +++ b/blockchain/reactor.go @@ -46,7 +46,8 @@ type BlockchainReactor struct { } func NewBlockchainReactor(state *sm.State, store *BlockStore, sync bool) *BlockchainReactor { - if state.LastBlockHeight != store.Height() { + if state.LastBlockHeight != store.Height() && + state.LastBlockHeight != store.Height()-1 { // XXX double check this logic. panic(Fmt("state (%v) and store (%v) height mismatch", state.LastBlockHeight, store.Height())) } requestsCh := make(chan BlockRequest, defaultChannelCapacity)