Browse Source

minor fix for when the blockstore is ahead by one.

pull/55/head
Jae Kwon 10 years ago
parent
commit
dc27d56cc3
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      blockchain/reactor.go

+ 2
- 1
blockchain/reactor.go View File

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


Loading…
Cancel
Save