WIP consensus

This commit is contained in:
Jae Kwon
2018-04-05 07:05:45 -07:00
parent 5d1c758730
commit 45ec5fd170
12 changed files with 104 additions and 143 deletions

View File

@@ -94,7 +94,9 @@ func (b *Block) Hash() cmn.HexBytes {
// MakePartSet returns a PartSet containing parts of a serialized block.
// This is the form in which the block is gossipped to peers.
func (b *Block) MakePartSet(partSize int) *PartSet {
bz, err := cdc.MarshalBinaryBare(b)
// We prefix the byte length, so that unmarshaling
// can easily happen via a reader.
bz, err := cdc.MarshalBinary(b)
if err != nil {
panic(err)
}