Skip to content

Commit

Permalink
Merge pull request #95 from lukso-network/fix/header-decoding
Browse files Browse the repository at this point in the history
Fix header decoding issue after integrating london hard fork
  • Loading branch information
atif-konasl authored Oct 20, 2021
2 parents 285716e + 6e82f82 commit cdb874a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions consensus/pandora/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (p *Pandora) SealHash(header *types.Header) (hash common.Hash) {
headerExtra.Slot = pandoraExtraData.Slot
extraData, _ = rlp.EncodeToBytes(headerExtra)
}
rlp.Encode(hasher, []interface{}{
enc := []interface{}{
header.ParentHash,
header.UncleHash,
header.Coinbase,
Expand All @@ -54,7 +54,11 @@ func (p *Pandora) SealHash(header *types.Header) (hash common.Hash) {
header.GasUsed,
header.Time,
extraData,
})
}
if header.BaseFee != nil {
enc = append(enc, header.BaseFee)
}
rlp.Encode(hasher, enc)
hasher.Sum(hash[:0])
return hash
}
Expand Down

0 comments on commit cdb874a

Please sign in to comment.