state save/load test.

This commit is contained in:
Jae Kwon
2014-10-07 00:43:34 -07:00
parent b73b7a54c7
commit 08f86176fc
11 changed files with 99 additions and 15 deletions

View File

@ -47,7 +47,7 @@ func (b *Block) ValidateBasic(lastBlockHeight uint32, lastBlockHash []byte) erro
if b.Header.Network != Config.Network {
return ErrBlockInvalidNetwork
}
if b.Header.Height != lastBlockHeight {
if b.Header.Height != lastBlockHeight+1 {
return ErrBlockInvalidBlockHeight
}
if !bytes.Equal(b.Header.LastBlockHash, lastBlockHash) {