From 17013051f2ece1924bd5fcdb46fb439671ee5dfd Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Tue, 16 Oct 2018 12:17:29 +0800 Subject: test: update genesis and keypairs --- test/keygen.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 test/keygen.go (limited to 'test/keygen.go') diff --git a/test/keygen.go b/test/keygen.go new file mode 100644 index 000000000..b2c789723 --- /dev/null +++ b/test/keygen.go @@ -0,0 +1,28 @@ +package main + +import ( + "encoding/hex" + "fmt" + + "github.com/dexon-foundation/dexon/crypto" +) + +func main() { + for i := 0; i < 4; i++ { + privKey, err := crypto.GenerateKey() + if err != nil { + panic(err) + } + address := crypto.PubkeyToAddress(privKey.PublicKey).String() + pk := hex.EncodeToString(crypto.CompressPubkey(&privKey.PublicKey)) + + fmt.Printf(` + "%s": { + "balance": "1000000000000000000000", + "staked": "500000000000000000000", + "publicKey": "0x%s" + },`, address, pk) + + crypto.SaveECDSA(fmt.Sprintf("test%d.nodekey", i), privKey) + } +} -- cgit v1.2.3