genesis json tests and mv ConsensusParams to types

This commit is contained in:
Ethan Buchman
2017-09-21 14:51:29 -04:00
parent 14abdd57f3
commit 2b6db268cf
9 changed files with 149 additions and 61 deletions
+2 -2
View File
@@ -165,7 +165,7 @@ func (bcR *BlockchainReactor) Receive(chID byte, src p2p.Peer, msgBytes []byte)
// maxMsgSize returns the maximum allowable size of a
// message on the blockchain reactor.
func (bcR *BlockchainReactor) maxMsgSize() int {
return bcR.state.GenesisDoc.ConsensusParams.MaxBlockSizeBytes + 2
return bcR.state.Params().MaxBlockSizeBytes + 2
}
// Handle messages from the poolReactor telling the reactor what to do.
@@ -226,7 +226,7 @@ FOR_LOOP:
// We need both to sync the first block.
break SYNC_LOOP
}
firstParts := first.MakePartSet(bcR.state.GenesisDoc.ConsensusParams.BlockPartSizeBytes)
firstParts := first.MakePartSet(bcR.state.Params().BlockPartSizeBytes)
firstPartsHeader := firstParts.Header()
// Finally, verify the first block using the second's commit
// NOTE: we can probably make this more efficient, but note that calling