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

Fix crash during reorg for v2.0.0 #590

Merged
merged 2 commits into from
Jul 27, 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
2 changes: 1 addition & 1 deletion internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ func DoCall(ctx context.Context, b Backend, args CallArgs, blockNrOrHash rpc.Blo
// this makes sure resources are cleaned up.
defer cancel()

block, err := b.BlockByHash(ctx, header.Hash())
block, err := b.BlockByNumberOrHash(ctx, blockNrOrHash)
if err != nil {
return nil, 0, false, err, nil
}
Expand Down
6 changes: 5 additions & 1 deletion params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,10 @@ func (c *ChainConfig) IsTIPXDCXReceiver(num *big.Int) bool {
return isForked(common.TIPXDCX, num) && !isForked(common.TIPXDCXReceiverDisable, num)
}

func (c *ChainConfig) IsXDCxDisable(num *big.Int) bool {
return isForked(common.TIPXDCXReceiverDisable, num)
}

func (c *ChainConfig) IsTIPXDCXLending(num *big.Int) bool {
return isForked(common.TIPXDCXLending, num)
}
Expand Down Expand Up @@ -789,7 +793,7 @@ func (c *ChainConfig) Rules(num *big.Int) Rules {
IsLondon: c.IsLondon(num),
IsMerge: c.IsMerge(num),
IsShanghai: c.IsShanghai(num),
IsXDCxDisable: c.IsTIPXDCXReceiver(num),
IsXDCxDisable: c.IsXDCxDisable(num),
IsEIP1559: c.IsEIP1559(num),
}
}