mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
fix linters caused by previous merge (#526)
This commit is contained in:
parent
e45b1d46fc
commit
2a677a5aff
2 changed files with 14 additions and 4 deletions
|
|
@ -533,18 +533,23 @@ func toBlockNumArg(number *big.Int) string {
|
||||||
if number == nil {
|
if number == nil {
|
||||||
return "latest"
|
return "latest"
|
||||||
}
|
}
|
||||||
|
|
||||||
pending := big.NewInt(-1)
|
pending := big.NewInt(-1)
|
||||||
|
finalized := big.NewInt(int64(rpc.FinalizedBlockNumber))
|
||||||
|
safe := big.NewInt(int64(rpc.SafeBlockNumber))
|
||||||
|
|
||||||
if number.Cmp(pending) == 0 {
|
if number.Cmp(pending) == 0 {
|
||||||
return "pending"
|
return "pending"
|
||||||
}
|
}
|
||||||
finalized := big.NewInt(int64(rpc.FinalizedBlockNumber))
|
|
||||||
if number.Cmp(finalized) == 0 {
|
if number.Cmp(finalized) == 0 {
|
||||||
return "finalized"
|
return "finalized"
|
||||||
}
|
}
|
||||||
safe := big.NewInt(int64(rpc.SafeBlockNumber))
|
|
||||||
if number.Cmp(safe) == 0 {
|
if number.Cmp(safe) == 0 {
|
||||||
return "safe"
|
return "safe"
|
||||||
}
|
}
|
||||||
|
|
||||||
return hexutil.EncodeBig(number)
|
return hexutil.EncodeBig(number)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -183,18 +183,23 @@ func toBlockNumArg(number *big.Int) string {
|
||||||
if number == nil {
|
if number == nil {
|
||||||
return "latest"
|
return "latest"
|
||||||
}
|
}
|
||||||
|
|
||||||
pending := big.NewInt(-1)
|
pending := big.NewInt(-1)
|
||||||
|
finalized := big.NewInt(int64(rpc.FinalizedBlockNumber))
|
||||||
|
safe := big.NewInt(int64(rpc.SafeBlockNumber))
|
||||||
|
|
||||||
if number.Cmp(pending) == 0 {
|
if number.Cmp(pending) == 0 {
|
||||||
return "pending"
|
return "pending"
|
||||||
}
|
}
|
||||||
finalized := big.NewInt(int64(rpc.FinalizedBlockNumber))
|
|
||||||
if number.Cmp(finalized) == 0 {
|
if number.Cmp(finalized) == 0 {
|
||||||
return "finalized"
|
return "finalized"
|
||||||
}
|
}
|
||||||
safe := big.NewInt(int64(rpc.SafeBlockNumber))
|
|
||||||
if number.Cmp(safe) == 0 {
|
if number.Cmp(safe) == 0 {
|
||||||
return "safe"
|
return "safe"
|
||||||
}
|
}
|
||||||
|
|
||||||
return hexutil.EncodeBig(number)
|
return hexutil.EncodeBig(number)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue