mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-26 00:16:18 +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:
|
||||
// - "latest", "earliest" or "pending" as string arguments
|
||||
// - "latest", "earliest", "pending" and "confirmed" as string arguments
|
||||
// - the block number
|
||||
// Returned errors:
|
||||
// - 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
|
||||
case "confirmed":
|
||||
*bn = ConfirmedBlockNumber
|
||||
return nil
|
||||
}
|
||||
|
||||
blckNum, err := hexutil.DecodeUint64(input)
|
||||
|
|
|
|||
Loading…
Reference in a new issue