mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
Update types.go
This commit is contained in:
parent
16f50285b7
commit
f919f50293
1 changed files with 2 additions and 2 deletions
|
|
@ -78,8 +78,8 @@ const (
|
|||
// - an out of range error when the given block number is either too little or too large
|
||||
func (bn *BlockNumber) UnmarshalJSON(data []byte) error {
|
||||
input := strings.TrimSpace(string(data))
|
||||
if len(input) >= 2 && input[0] == '"' && input[len(input)-1] == '"' {
|
||||
input = input[1 : len(input)-1]
|
||||
if n := len(input); n >= 2 && input[0] == '"' && input[n-1] == '"' {
|
||||
input = input[1 : n-1]
|
||||
}
|
||||
|
||||
switch input {
|
||||
|
|
|
|||
Loading…
Reference in a new issue