sharding: error and comment formatting

Former-commit-id: 0c6f6897381ef5f52ae05ad6152f8a55ffb94a2f [formerly b5088fd6f495eafe5f88d7aa2f7bc229bba61c66]
Former-commit-id: 213b3052de118e45c67000d510e91f185e057007
This commit is contained in:
Eli 2018-05-23 10:51:54 -07:00
parent 1c3387fca7
commit 4bbaa445dd
2 changed files with 4 additions and 3 deletions

View File

@ -193,7 +193,7 @@ func Deserialize(serialisedBlob []byte) (*[]*types.Transaction, error) {
// Chunks is a wrapper around a chunk array to implement DerivableList,
// which allows us to Merklize the chunks into the chunkRoot
// which allows us to Merklize the chunks into the chunkRoot.
type Chunks []byte
// Len returns the number of chunks in this list.

View File

@ -77,11 +77,12 @@ func (s *Shard) CollationByHash(headerHash *common.Hash) (*Collation, error) {
if err != nil {
return nil, fmt.Errorf("cannot fetch body by chunk root: %v", err)
}
// TODO: deserializes the body into a txs slice instead of using
// deserialize the body into a txs slice instead of using
// nil as the third arg to MakeCollation.
txs, err := Deserialize(body)
if err != nil {
return nil, fmt.Errorf("cannot deserialize body", err)
return nil, fmt.Errorf("cannot deserialize body: %v", err)
}
col := NewCollation(header, body, *txs)
return col, nil