diff --git a/sharding/shard.go b/sharding/shard.go index 0cde3b2f6..2126fcd44 100644 --- a/sharding/shard.go +++ b/sharding/shard.go @@ -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) }