Add util to lookup private key from address (for benchmark)

pull/60/head
Rongjian Lan 6 years ago
parent 13467d48fd
commit 9a79042155
  1. 12
      client/utils.go

@ -0,0 +1,12 @@
package client
import "github.com/simple-rules/harmony-benchmark/crypto/pki"
var AddressToIntPriKeyMap map[[20]byte]int // For convenience, we use int as the secret seed for generating private key
func init() {
AddressToIntPriKeyMap := make(map[[20]byte]int)
for i := 0; i < 10000; i++ {
AddressToIntPriKeyMap[pki.GetAddressFromInt(i)] = i
}
}
Loading…
Cancel
Save