@@ -27,7 +27,6 @@ import (
27
27
exp "github.com/iotexproject/iotex-core/explorer/idl/explorer"
28
28
"github.com/iotexproject/iotex-core/iotxaddress"
29
29
"github.com/iotexproject/iotex-core/logger"
30
- "github.com/iotexproject/iotex-core/pkg/enc"
31
30
"github.com/iotexproject/iotex-core/testutil"
32
31
)
33
32
@@ -49,6 +48,8 @@ type PKPair struct {
49
48
func main () {
50
49
// path of config file containing all the public/private key paris of addresses getting transfers from Creator in genesis block
51
50
var configPath string
51
+ // chain ID. Default is 67305985
52
+ var chainID int
52
53
// target address for jrpc connection. Default is "127.0.0.1:14004"
53
54
var addr string
54
55
// number of transfer injections. Default is 50
@@ -91,6 +92,7 @@ func main() {
91
92
var resetInterval int
92
93
93
94
flag .StringVar (& configPath , "injector-config-path" , "./tools/actioninjector/gentsfaddrs.yaml" , "path of config file of genesis transfer addresses" )
95
+ flag .IntVar (& chainID , "chain" , 67305985 , "id of target chain" )
94
96
flag .StringVar (& addr , "addr" , "127.0.0.1:14004" , "target ip:port for jrpc connection" )
95
97
flag .IntVar (& transferNum , "transfer-num" , 50 , "number of transfer injections" )
96
98
flag .IntVar (& transferGasLimit , "transfer-gas-limit" , 1000000 , "transfer gas limit" )
@@ -128,7 +130,7 @@ func main() {
128
130
// Construct iotex addresses for loaded senders
129
131
addrs := []* iotxaddress.Address {}
130
132
for _ , pkPair := range addresses .PKPairs {
131
- addr := testutil .ConstructAddress (enc . MachineEndian . Uint32 ( iotxaddress . ChainID ), pkPair .PubKey , pkPair .PriKey )
133
+ addr := testutil .ConstructAddress (uint32 ( chainID ), pkPair .PubKey , pkPair .PriKey )
132
134
addrs = append (addrs , addr )
133
135
}
134
136
admins := addrs [len (addrs )- adminNumber :]
0 commit comments