@@ -31,7 +31,6 @@ import (
31
31
"github.com/XinFinOrg/XDPoSChain/accounts/abi"
32
32
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
33
33
"github.com/XinFinOrg/XDPoSChain/common"
34
- "github.com/XinFinOrg/XDPoSChain/core"
35
34
"github.com/XinFinOrg/XDPoSChain/core/types"
36
35
"github.com/XinFinOrg/XDPoSChain/crypto"
37
36
"github.com/XinFinOrg/XDPoSChain/params"
@@ -42,8 +41,8 @@ func TestSimulatedBackend(t *testing.T) {
42
41
var gasLimit uint64 = 8000029
43
42
key , _ := crypto .GenerateKey () // nolint: gosec
44
43
auth , _ := bind .NewKeyedTransactorWithChainID (key , big .NewInt (1337 ))
45
- genAlloc := make (core .GenesisAlloc )
46
- genAlloc [auth .From ] = core. GenesisAccount {Balance : big .NewInt (9223372036854775807 )}
44
+ genAlloc := make (types .GenesisAlloc )
45
+ genAlloc [auth .From ] = types. Account {Balance : big .NewInt (9223372036854775807 )}
47
46
48
47
config := * params .TestXDPoSMockChainConfig
49
48
config .Eip1559Block = big .NewInt (0 )
@@ -119,7 +118,7 @@ func simTestBackend(testAddr common.Address) *SimulatedBackend {
119
118
config := * params .TestXDPoSMockChainConfig
120
119
config .Eip1559Block = big .NewInt (0 )
121
120
return NewXDCSimulatedBackend (
122
- core .GenesisAlloc {
121
+ types .GenesisAlloc {
123
122
testAddr : {Balance : big .NewInt (100000000000000000 )},
124
123
},
125
124
10000000 ,
@@ -144,7 +143,7 @@ func TestNewSimulatedBackend(t *testing.T) {
144
143
func TestAdjustTime (t * testing.T ) {
145
144
t .Parallel ()
146
145
sim := NewXDCSimulatedBackend (
147
- core .GenesisAlloc {},
146
+ types .GenesisAlloc {},
148
147
10000000 ,
149
148
params .TestXDPoSMockChainConfig ,
150
149
)
@@ -226,7 +225,7 @@ func TestBalanceAt(t *testing.T) {
226
225
func TestBlockByHash (t * testing.T ) {
227
226
t .Parallel ()
228
227
sim := NewXDCSimulatedBackend (
229
- core .GenesisAlloc {},
228
+ types .GenesisAlloc {},
230
229
10000000 ,
231
230
params .TestXDPoSMockChainConfig ,
232
231
)
@@ -250,7 +249,7 @@ func TestBlockByHash(t *testing.T) {
250
249
func TestBlockByNumber (t * testing.T ) {
251
250
t .Parallel ()
252
251
sim := NewXDCSimulatedBackend (
253
- core .GenesisAlloc {},
252
+ types .GenesisAlloc {},
254
253
10000000 ,
255
254
params .TestXDPoSMockChainConfig ,
256
255
)
@@ -446,7 +445,7 @@ func TestEstimateGas(t *testing.T) {
446
445
opts , _ := bind .NewKeyedTransactorWithChainID (key , big .NewInt (1337 ))
447
446
448
447
sim := NewXDCSimulatedBackend (
449
- core .GenesisAlloc {addr : {Balance : big .NewInt (params .Ether )}},
448
+ types .GenesisAlloc {addr : {Balance : big .NewInt (params .Ether )}},
450
449
10000000 ,
451
450
params .TestXDPoSMockChainConfig ,
452
451
)
@@ -557,10 +556,10 @@ func TestEstimateGasWithPrice(t *testing.T) {
557
556
addr := crypto .PubkeyToAddress (key .PublicKey )
558
557
559
558
sim := NewXDCSimulatedBackend (
560
- core .GenesisAlloc {addr : {Balance : big .NewInt (params .Ether * 2 + 2e17 )}},
559
+ types .GenesisAlloc {addr : {Balance : big .NewInt (params .Ether * 2 + 2e17 )}},
561
560
10000000 ,
562
561
params .TestXDPoSMockChainConfig ,
563
- )
562
+ )
564
563
defer sim .Close ()
565
564
566
565
recipient := common .HexToAddress ("deadbeef" )
@@ -908,7 +907,7 @@ func TestTransactionReceipt(t *testing.T) {
908
907
func TestSuggestGasPrice (t * testing.T ) {
909
908
t .Parallel ()
910
909
sim := NewXDCSimulatedBackend (
911
- core .GenesisAlloc {},
910
+ types .GenesisAlloc {},
912
911
10000000 ,
913
912
params .TestXDPoSMockChainConfig ,
914
913
)
0 commit comments