Skip to content

Commit

Permalink
Use fixed bytes for addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
nytzuga committed Jan 4, 2024
1 parent 1819327 commit e079719
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions precompile/contracts/rewardmanager/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (u *InitialRewardConfig) MarshalBinary() ([]byte, error) {
if p.Err != nil {
return nil, p.Err
}
p.PackBytes(u.RewardAddress[:])
p.PackFixedBytes(u.RewardAddress[:])
return p.Bytes, p.Err
}

Expand All @@ -43,7 +43,7 @@ func (u *InitialRewardConfig) UnmarshalBinary(data []byte) error {
if p.Err != nil {
return p.Err
}
u.RewardAddress = common.BytesToAddress(p.UnpackBytes())
u.RewardAddress = common.BytesToAddress(p.UnpackFixedBytes(common.AddressLength))
if p.Err != nil {
return p.Err
}
Expand Down

0 comments on commit e079719

Please sign in to comment.