Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HexOrDecimal - to accept unquoted numbers - in json (e3) #11262

Merged
merged 5 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
save
  • Loading branch information
AskAlexSharov committed Jul 22, 2024
commit a20dbe6b2f57029129de392f2832a019e0fad87c
11 changes: 11 additions & 0 deletions core/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import (
"context"
"math/big"
"os"
"testing"

"github.com/holiman/uint256"
Expand Down Expand Up @@ -167,3 +168,13 @@
state.GetState(address, &key1, storage1)
assert.Equal(uint256.NewInt(0x01c9), storage1)
}

// See https://github.com/erigontech/erigon/pull/11264
func TestDecodeBalance0(t *testing.T) {
genesisData, err := os.ReadFile("./genesis_test.json")
require.NoError(t, err)

genesis := &types.Genesis{}
err = json.Unmarshal(genesisData, genesis)

Check failure on line 178 in core/genesis_test.go

View workflow job for this annotation

GitHub Actions / tests (ubuntu-22.04)

undefined: json

Check failure on line 178 in core/genesis_test.go

View workflow job for this annotation

GitHub Actions / tests-windows (windows-2022)

undefined: json

Check failure on line 178 in core/genesis_test.go

View workflow job for this annotation

GitHub Actions / tests (macos-14)

undefined: json

Check failure on line 178 in core/genesis_test.go

View workflow job for this annotation

GitHub Actions / tests (ubuntu-22.04)

undefined: json (typecheck)

Check failure on line 178 in core/genesis_test.go

View workflow job for this annotation

GitHub Actions / tests (macos-14)

undefined: json
require.NoError(t, err)
}
Loading
Loading