diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-16 12:17:29 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:50 +0800 |
commit | 17013051f2ece1924bd5fcdb46fb439671ee5dfd (patch) | |
tree | 02334462e75aecbb57a1d41ba06d674bee47f3e6 /test/keygen.go | |
parent | 0050e7ffb8dbf0b9e02e3a00e7c4634ae0ce30a9 (diff) | |
download | dexon-17013051f2ece1924bd5fcdb46fb439671ee5dfd.tar dexon-17013051f2ece1924bd5fcdb46fb439671ee5dfd.tar.gz dexon-17013051f2ece1924bd5fcdb46fb439671ee5dfd.tar.bz2 dexon-17013051f2ece1924bd5fcdb46fb439671ee5dfd.tar.lz dexon-17013051f2ece1924bd5fcdb46fb439671ee5dfd.tar.xz dexon-17013051f2ece1924bd5fcdb46fb439671ee5dfd.tar.zst dexon-17013051f2ece1924bd5fcdb46fb439671ee5dfd.zip |
test: update genesis and keypairs
Diffstat (limited to 'test/keygen.go')
-rw-r--r-- | test/keygen.go | 28 |
1 files changed, 28 insertions, 0 deletions
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) + } +} |