mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
fix switch case issue
This commit is contained in:
parent
abb0dcc48b
commit
c637c7b915
1 changed files with 2 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON parses the given JSON fragment into a BlockNumber. It supports:
|
// UnmarshalJSON parses the given JSON fragment into a BlockNumber. It supports:
|
||||||
// - "latest", "earliest" or "pending" as string arguments
|
// - "latest", "earliest", "pending" and "confirmed" as string arguments
|
||||||
// - the block number
|
// - the block number
|
||||||
// Returned errors:
|
// Returned errors:
|
||||||
// - an invalid block number error when the given argument isn't a known strings
|
// - an invalid block number error when the given argument isn't a known strings
|
||||||
|
|
@ -147,6 +147,7 @@ func (bn *BlockNumber) UnmarshalJSON(data []byte) error {
|
||||||
return nil
|
return nil
|
||||||
case "confirmed":
|
case "confirmed":
|
||||||
*bn = ConfirmedBlockNumber
|
*bn = ConfirmedBlockNumber
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
blckNum, err := hexutil.DecodeUint64(input)
|
blckNum, err := hexutil.DecodeUint64(input)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue