mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-06 09:42:19 +00:00
sharding: error and comment formatting
Former-commit-id: 0c6f6897381ef5f52ae05ad6152f8a55ffb94a2f [formerly b5088fd6f495eafe5f88d7aa2f7bc229bba61c66] Former-commit-id: 213b3052de118e45c67000d510e91f185e057007
This commit is contained in:
parent
1c3387fca7
commit
4bbaa445dd
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user