Commit 863558f3 authored by vipwzw's avatar vipwzw

add more balance

parent 4b876a36
...@@ -39,12 +39,12 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *ethtxs.DeployPara) { ...@@ -39,12 +39,12 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *ethtxs.DeployPara) {
ValidatorPriKey = append(ValidatorPriKey, key) ValidatorPriKey = append(ValidatorPriKey, key)
account := core.GenesisAccount{ account := core.GenesisAccount{
Balance: big.NewInt(100000000 * 100), Balance: big.NewInt(100000000 * 100000000),
PrivateKey: crypto.FromECDSA(key), PrivateKey: crypto.FromECDSA(key),
} }
alloc[addr] = account alloc[addr] = account
} }
gasLimit := uint64(1300000) gasLimit := uint64(100000000)
sim := new(ethinterface.SimExtend) sim := new(ethinterface.SimExtend)
sim.SimulatedBackend = backends.NewSimulatedBackend(alloc, gasLimit) sim.SimulatedBackend = backends.NewSimulatedBackend(alloc, gasLimit)
...@@ -87,7 +87,7 @@ func PrepareTestEnvironment(deployerPrivateKey string, ethValidatorAddrKeys []st ...@@ -87,7 +87,7 @@ func PrepareTestEnvironment(deployerPrivateKey string, ethValidatorAddrKeys []st
alloc[addr] = account alloc[addr] = account
} }
gasLimit := uint64(1300000) gasLimit := uint64(100000000)
//sim := backends.NewSimulatedBackend(core.GenesisAlloc{addr: {Balance: big.NewInt(params.Ether)}}, 10000000) //sim := backends.NewSimulatedBackend(core.GenesisAlloc{addr: {Balance: big.NewInt(params.Ether)}}, 10000000)
sim := backends.NewSimulatedBackend(alloc, gasLimit) sim := backends.NewSimulatedBackend(alloc, gasLimit)
......
...@@ -209,7 +209,7 @@ func Test_CreateBridgeToken(t *testing.T) { ...@@ -209,7 +209,7 @@ func Test_CreateBridgeToken(t *testing.T) {
balance, err := ethRelayer.GetBalance("", para.InitValidators[0].String()) balance, err := ethRelayer.GetBalance("", para.InitValidators[0].String())
require.Nil(t, err) require.Nil(t, err)
assert.Equal(t, balance, "10000000000") assert.Equal(t, balance, "1000000000000000")
tokenAddrbty, err := ethRelayer.CreateBridgeToken("BTY") tokenAddrbty, err := ethRelayer.CreateBridgeToken("BTY")
require.Nil(t, err) require.Nil(t, err)
......
...@@ -246,12 +246,12 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *DeployPara) { ...@@ -246,12 +246,12 @@ func PrepareTestEnv() (*ethinterface.SimExtend, *DeployPara) {
ValidatorPriKey = append(ValidatorPriKey, key) ValidatorPriKey = append(ValidatorPriKey, key)
account := core.GenesisAccount{ account := core.GenesisAccount{
Balance: big.NewInt(100000000 * 100), Balance: big.NewInt(100000000 * 100000000),
PrivateKey: crypto.FromECDSA(key), PrivateKey: crypto.FromECDSA(key),
} }
alloc[addr] = account alloc[addr] = account
} }
gasLimit := uint64(1300000) gasLimit := uint64(100000000)
sim := new(ethinterface.SimExtend) sim := new(ethinterface.SimExtend)
sim.SimulatedBackend = backends.NewSimulatedBackend(alloc, gasLimit) sim.SimulatedBackend = backends.NewSimulatedBackend(alloc, gasLimit)
......
...@@ -49,11 +49,11 @@ func Test_GetAddressFromBridgeRegistry(t *testing.T) { ...@@ -49,11 +49,11 @@ func Test_GetAddressFromBridgeRegistry(t *testing.T) {
alloc := make(core.GenesisAlloc) alloc := make(core.GenesisAlloc)
genesisAddr := crypto.PubkeyToAddress(genesiskey.PublicKey) genesisAddr := crypto.PubkeyToAddress(genesiskey.PublicKey)
genesisAccount := core.GenesisAccount{ genesisAccount := core.GenesisAccount{
Balance: big.NewInt(10000000000 * 10000), Balance: big.NewInt(10000000000 * 100000000),
PrivateKey: crypto.FromECDSA(genesiskey), PrivateKey: crypto.FromECDSA(genesiskey),
} }
alloc[genesisAddr] = genesisAccount alloc[genesisAddr] = genesisAccount
gasLimit := uint64(1300000) gasLimit := uint64(100000000)
sim := new(ethinterface.SimExtend) sim := new(ethinterface.SimExtend)
sim.SimulatedBackend = backends.NewSimulatedBackend(alloc, gasLimit) sim.SimulatedBackend = backends.NewSimulatedBackend(alloc, gasLimit)
...@@ -152,13 +152,13 @@ func PrepareTestEnvironment(deployerPrivateKey string, ethValidatorAddrKeys []st ...@@ -152,13 +152,13 @@ func PrepareTestEnvironment(deployerPrivateKey string, ethValidatorAddrKeys []st
ValidatorPriKey = append(ValidatorPriKey, key) ValidatorPriKey = append(ValidatorPriKey, key)
account := core.GenesisAccount{ account := core.GenesisAccount{
Balance: big.NewInt(100000000 * 100), Balance: big.NewInt(100000000 * 100000000),
PrivateKey: crypto.FromECDSA(key), PrivateKey: crypto.FromECDSA(key),
} }
alloc[addr] = account alloc[addr] = account
} }
gasLimit := uint64(1300000) gasLimit := uint64(100000000)
sim := backends.NewSimulatedBackend(alloc, gasLimit) sim := backends.NewSimulatedBackend(alloc, gasLimit)
InitPowers := []*big.Int{big.NewInt(80), big.NewInt(10), big.NewInt(10), big.NewInt(10)} InitPowers := []*big.Int{big.NewInt(80), big.NewInt(10), big.NewInt(10), big.NewInt(10)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment