storage: check for existing blocks only in mainchain

this solves a reorg issue when the node thinks the current chain head is a side branch

https://github.com/lian/bitcoin-ruby/issues/78