Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the extra global state #7

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions core/types/arb_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,6 @@ type HeaderInfo struct {
SendCount uint64
L1BlockNumber uint64
ArbOSFormatVersion uint64
HotShotHeight uint64
}

func (info HeaderInfo) extra() []byte {
Expand All @@ -519,7 +518,6 @@ func (info HeaderInfo) mixDigest() [32]byte {
binary.BigEndian.PutUint64(mixDigest[:8], info.SendCount)
binary.BigEndian.PutUint64(mixDigest[8:16], info.L1BlockNumber)
binary.BigEndian.PutUint64(mixDigest[16:24], info.ArbOSFormatVersion)
binary.BigEndian.PutUint64(mixDigest[24:32], info.HotShotHeight)
return mixDigest
}

Expand All @@ -539,6 +537,5 @@ func DeserializeHeaderExtraInformation(header *Header) HeaderInfo {
extra.SendCount = binary.BigEndian.Uint64(header.MixDigest[:8])
extra.L1BlockNumber = binary.BigEndian.Uint64(header.MixDigest[8:16])
extra.ArbOSFormatVersion = binary.BigEndian.Uint64(header.MixDigest[16:24])
extra.HotShotHeight = binary.BigEndian.Uint64(header.MixDigest[24:32])
return extra
}
1 change: 0 additions & 1 deletion internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,6 @@ func fillArbitrumNitroHeaderInfo(header *types.Header, fields map[string]interfa
fields["l1BlockNumber"] = hexutil.Uint64(info.L1BlockNumber)
fields["sendRoot"] = info.SendRoot
fields["sendCount"] = hexutil.Uint64(info.SendCount)
fields["hotShotHeight"] = hexutil.Uint64(info.HotShotHeight)
}

// rpcMarshalHeader uses the generalized output filler, then adds the total difficulty field, which requires
Expand Down
Loading