Merge from panic branch

This commit is contained in:
Ethan Buchman
2015-06-17 00:16:58 -04:00
committed by Jae Kwon
parent 7196e5ad8e
commit a7ecdd10de
15 changed files with 117 additions and 32 deletions

View File

@ -54,10 +54,12 @@ type BlockchainReactor struct {
}
func NewBlockchainReactor(state *sm.State, store *BlockStore, sync bool) *BlockchainReactor {
// SANITY CHECK
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()))
}
// SANITY CHECK END
requestsCh := make(chan BlockRequest, defaultChannelCapacity)
timeoutsCh := make(chan string, defaultChannelCapacity)
pool := NewBlockPool(