Commit 1469fae6 authored by duanjinfei's avatar duanjinfei

change acc start index and send tran after sleep time

parent a16e1e29
......@@ -18,6 +18,8 @@
"isInitErc721": false,
"startTokenId": 1,
"endTokenId": 100,
"accStartIndex": 0,
"sendTranAfterSleep": 60,
"transferType": []
}
......
......@@ -25,7 +25,7 @@ func main() {
// 转账交易case
if len(tool.Cfg.TransferType) != 0 {
accIndex := 0
accIndex := tool.Cfg.AccStartIndex
nonceMap := util.GetAccountNonce(tool.Cfg.RpcNode)
arrFormat := tool.ParseAccountConfig("./config/account.json")
parseContractConfig := tool.ParseContractConfig("./config/contractConfig.json")
......
......@@ -519,6 +519,6 @@ func SendTransaction(trans []*types.Transaction) {
}
log.Info("Input count:", i)
}
time.Sleep(time.Second * 60)
time.Sleep(time.Second * time.Duration(tool.Cfg.SendTranAfterSleep))
log.Info("Send tran successful")
}
......@@ -27,6 +27,8 @@ type ConfigJson struct {
IsInitErc20 bool `json:"isInitErc20"`
IsInitErc721Mint bool `json:"isInitErc721Mint"`
IsInitErc721 bool `json:"isInitErc721"`
AccStartIndex int `json:"accStartIndex"`
SendTranAfterSleep int `json:"sendTranAfterSleep"`
}
type Config struct {
......@@ -44,6 +46,8 @@ type Config struct {
IsInitErc721Mint bool
IsInitErc721 bool
ContractMap []map[string]common.Address
AccStartIndex int
SendTranAfterSleep int
}
type AccArr struct {
......@@ -108,6 +112,8 @@ func ParseConfig(path string) {
IsInitErc721Mint: cfgJson.IsInitErc721Mint,
IsInitErc721: cfgJson.IsInitErc721,
ContractMap: ParseContractConfig("./config/contractConfig.json"),
AccStartIndex: cfgJson.AccStartIndex,
SendTranAfterSleep: cfgJson.SendTranAfterSleep,
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment