mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Fix crash during reorg for v2.0.0 (#590)
* params: fix usage of IsXDCxDisable * internal/ethapi: fix nil block in function DoCall during reorg
This commit is contained in:
parent
ad49e17909
commit
438341c2ea
2 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue