From 4bbaa445dd117c98bf5fb5d6009c0216e16a6974 Mon Sep 17 00:00:00 2001 From: Eli Date: Wed, 23 May 2018 10:51:54 -0700 Subject: [PATCH] sharding: error and comment formatting Former-commit-id: 0c6f6897381ef5f52ae05ad6152f8a55ffb94a2f [formerly b5088fd6f495eafe5f88d7aa2f7bc229bba61c66] Former-commit-id: 213b3052de118e45c67000d510e91f185e057007 --- sharding/collation.go | 2 +- sharding/shard.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sharding/collation.go b/sharding/collation.go index dfa923430..b0e4fa985 100644 --- a/sharding/collation.go +++ b/sharding/collation.go @@ -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. diff --git a/sharding/shard.go b/sharding/shard.go index cf967745b..fb287750e 100644 --- a/sharding/shard.go +++ b/sharding/shard.go @@ -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