aboutsummaryrefslogtreecommitdiffstats
path: root/dex/app_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'dex/app_test.go')
-rw-r--r--dex/app_test.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/dex/app_test.go b/dex/app_test.go
index 9278160fb..7fc4933de 100644
--- a/dex/app_test.go
+++ b/dex/app_test.go
@@ -494,12 +494,18 @@ func BenchmarkBlockDeliveredFlow(b *testing.B) {
func newTestDexonWithGenesis(allocKey *ecdsa.PrivateKey) (*Dexon, error) {
db := ethdb.NewMemDatabase()
+ key, err := crypto.GenerateKey()
+ if err != nil {
+ panic(err)
+ }
+
testBankAddress := crypto.PubkeyToAddress(allocKey.PublicKey)
genesis := core.DefaultTestnetGenesisBlock()
genesis.Alloc = core.GenesisAlloc{
testBankAddress: {
- Balance: big.NewInt(100000000000000000),
- Staked: big.NewInt(50000000000000000),
+ Balance: big.NewInt(100000000000000000),
+ Staked: big.NewInt(50000000000000000),
+ PublicKey: crypto.FromECDSAPub(&key.PublicKey),
},
}
chainConfig, _, err := core.SetupGenesisBlock(db, genesis)
@@ -507,11 +513,6 @@ func newTestDexonWithGenesis(allocKey *ecdsa.PrivateKey) (*Dexon, error) {
return nil, err
}
- key, err := crypto.GenerateKey()
- if err != nil {
- return nil, err
- }
-
config := Config{PrivateKey: key}
vmConfig := vm.Config{IsBlockProposer: true}