sharding: correct deserialize function used

Former-commit-id: 6de1a755321f040b69e8cfa9764ac7fc9afd4201 [formerly c7dfb82bd0958b8806ca1f5d4771d31bcc76f072]
Former-commit-id: 08718f359c098fd2bdc95553dbe6e72005efac7a
This commit is contained in:
Eli 2018-05-27 20:20:27 -07:00
parent 2f29abe80b
commit ac3c34f17f
2 changed files with 3 additions and 4 deletions

View File

@ -104,9 +104,8 @@ func (c *Collation) ProposerAddress() *common.Address {
// CalculateChunkRoot updates the collation header's chunk root based on the body.
func (c *Collation) CalculateChunkRoot() {
// TODO: this needs to be based on blob serialization.
// For proof of custody we need to split chunks (body) into chunk + salt and
// take the merkle root of that.
// TODO: For proof of custody we need to split chunks (body) into chunk + salt
// and take the merkle root of that.
chunks := Chunks(c.body) // wrapper allowing us to merklizing the chunks
chunkRoot := types.DeriveSha(chunks) // merklize the serialized blobs.

View File

@ -72,7 +72,7 @@ func (s *Shard) CollationByHash(headerHash *common.Hash) (*Collation, error) {
// deserialize the body into a txs slice instead of using
// nil as the third arg to MakeCollation.
txs, err := Deserialize(body)
txs, err := DeserializeBlobToTx(body)
if err != nil {
return nil, fmt.Errorf("cannot deserialize body: %v", err)
}