diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index fad8f0cb513c..d1c02f7ea009 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1323,7 +1323,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 } diff --git a/params/config.go b/params/config.go index ff2de6a7ebda..650722c4af6f 100644 --- a/params/config.go +++ b/params/config.go @@ -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) } @@ -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), } }