sharding: use new header.EncodeRLP method

Former-commit-id: cf610c419a0c56c5257201274eea5cf0345d44ad [formerly b90bb344e2165eecc015f6174dd065abc7365b81]
Former-commit-id: 048f0c5a50c1818c7967a7ffa08f61d22b8a6aef
This commit is contained in:
Raul Jordan 2018-05-09 17:35:32 -04:00
parent 256892e6b7
commit f8f879f893

View File

@ -194,7 +194,7 @@ func (s *Shard) SetCanonical(header *CollationHeader) error {
return err
}
key := canonicalCollationLookupKey(dbHeader.ShardID(), dbHeader.Period())
encoded, err := rlp.EncodeToBytes(dbHeader)
encoded, err := dbHeader.EncodeRLP()
if err != nil {
return fmt.Errorf("cannot encode header: %v", err)
}