Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 6 additions & 6 deletions core/blockchain_ext_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func InsertChainAcceptSingleBlock(t *testing.T, create createFunc) {
genesisBalance := big.NewInt(1000000)
gspec := &Genesis{
Config: &params.ChainConfig{HomesteadBlock: new(big.Int)},
Alloc: GenesisAlloc{addr1: {Balance: genesisBalance}},
Alloc: types.GenesisAlloc{addr1: {Balance: genesisBalance}},
}
blockchain, err := create(chainDB, gspec, common.Hash{}, t.TempDir())
if err != nil {
Expand Down Expand Up @@ -718,7 +718,7 @@ func BuildOnVariousStages(t *testing.T, create createFunc) {
genesisBalance := big.NewInt(1000000)
gspec := &Genesis{
Config: &params.ChainConfig{HomesteadBlock: new(big.Int)},
Alloc: GenesisAlloc{
Alloc: types.GenesisAlloc{
addr1: {Balance: genesisBalance},
addr3: {Balance: genesisBalance},
},
Expand Down Expand Up @@ -875,7 +875,7 @@ func EmptyBlocks(t *testing.T, create createFunc) {

gspec := &Genesis{
Config: &params.ChainConfig{HomesteadBlock: new(big.Int)},
Alloc: GenesisAlloc{},
Alloc: types.GenesisAlloc{},
}

blockchain, err := create(chainDB, gspec, common.Hash{}, t.TempDir())
Expand Down Expand Up @@ -1396,7 +1396,7 @@ func GenerateChainInvalidBlockFee(t *testing.T, create createFunc) {
genesisBalance := new(big.Int).Mul(big.NewInt(1000000), big.NewInt(params.Ether))
gspec := &Genesis{
Config: params.TestFortunaChainConfig,
Alloc: GenesisAlloc{addr1: {Balance: genesisBalance}},
Alloc: types.GenesisAlloc{addr1: {Balance: genesisBalance}},
}

blockchain, err := create(chainDB, gspec, common.Hash{}, t.TempDir())
Expand Down Expand Up @@ -1437,7 +1437,7 @@ func InsertChainInvalidBlockFee(t *testing.T, create createFunc) {
genesisBalance := new(big.Int).Mul(big.NewInt(1000000), big.NewInt(params.Ether))
gspec := &Genesis{
Config: params.TestFortunaChainConfig,
Alloc: GenesisAlloc{addr1: {Balance: genesisBalance}},
Alloc: types.GenesisAlloc{addr1: {Balance: genesisBalance}},
}

blockchain, err := create(chainDB, gspec, common.Hash{}, t.TempDir())
Expand Down Expand Up @@ -1570,7 +1570,7 @@ func StatefulPrecompiles(t *testing.T, create createFunc) {
}
gspec := &Genesis{
Config: &config,
Alloc: GenesisAlloc{addr1: {Balance: genesisBalance}},
Alloc: types.GenesisAlloc{addr1: {Balance: genesisBalance}},
}

blockchain, err := create(chainDB, gspec, common.Hash{}, t.TempDir())
Expand Down
2 changes: 1 addition & 1 deletion core/blockchain_log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestAcceptedLogsSubscription(t *testing.T) {
funds = new(big.Int).Mul(big.NewInt(100), big.NewInt(params.Ether))
gspec = &Genesis{
Config: params.TestChainConfig,
Alloc: GenesisAlloc{addr1: {Balance: funds}},
Alloc: types.GenesisAlloc{addr1: {Balance: funds}},
BaseFee: big.NewInt(legacy.BaseFee),
}
contractAddress = crypto.CreateAddress(addr1, 0)
Expand Down
2 changes: 1 addition & 1 deletion core/blockchain_repair_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ func testRepairWithScheme(t *testing.T, tt *rewindTest, snapshots bool, scheme s
gspec = &Genesis{
BaseFee: feeConfig.MinBaseFee,
Config: &chainConfig,
Alloc: GenesisAlloc{addr1: {Balance: big.NewInt(params.Ether)}},
Alloc: types.GenesisAlloc{addr1: {Balance: big.NewInt(params.Ether)}},
}
signer = types.LatestSigner(gspec.Config)
engine = dummy.NewFullFaker()
Expand Down
2 changes: 1 addition & 1 deletion core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ func (g *Genesis) Verify() error {
func GenesisBlockForTesting(db ethdb.Database, addr common.Address, balance *big.Int) *types.Block {
g := Genesis{
Config: params.TestChainConfig,
Alloc: GenesisAlloc{addr: {Balance: balance}},
Alloc: types.GenesisAlloc{addr: {Balance: balance}},
BaseFee: big.NewInt(legacy.BaseFee),
}
return g.MustCommit(db, triedb.NewDatabase(db, triedb.HashDefaults))
Expand Down
4 changes: 2 additions & 2 deletions core/state_processor_ext_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ func TestBadTxAllowListBlock(t *testing.T) {

gspec = &Genesis{
Config: config,
Alloc: GenesisAlloc{
testAddr: GenesisAccount{
Alloc: types.GenesisAlloc{
testAddr: types.Account{
Balance: big.NewInt(1000000000000000000), // 1 ether
Nonce: 0,
},
Expand Down
4 changes: 2 additions & 2 deletions core/txindexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestTransactionIndices(t *testing.T) {
funds = big.NewInt(10000000000000)
gspec = &Genesis{
Config: &params.ChainConfig{HomesteadBlock: new(big.Int)},
Alloc: GenesisAlloc{addr1: {Balance: funds}},
Alloc: types.GenesisAlloc{addr1: {Balance: funds}},
}
signer = types.LatestSigner(gspec.Config)
)
Expand Down Expand Up @@ -177,7 +177,7 @@ func TestTransactionSkipIndexing(t *testing.T) {
funds = big.NewInt(10000000000000)
gspec = &Genesis{
Config: &params.ChainConfig{HomesteadBlock: new(big.Int)},
Alloc: GenesisAlloc{addr1: {Balance: funds}},
Alloc: types.GenesisAlloc{addr1: {Balance: funds}},
}
signer = types.LatestSigner(gspec.Config)
)
Expand Down