Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lt client fix #1260

Merged
merged 11 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion loadtest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ func (c *LoadTestClient) generateMessage(config Config, key cryptotypes.PrivKey,
}}

default:
fmt.Printf("Unrecognized message type %s", config.MessageType)
fmt.Printf("Unrecognized message type %s\n", config.MessageType)
}

if strings.Contains(config.MessageType, "failure") {
Expand Down
9 changes: 2 additions & 7 deletions loadtest/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func (sc *SignerClient) GetTestAccountsKeys(maxAccounts int) []cryptotypes.PrivK

var testAccountsKeys = make([]cryptotypes.PrivKey, int(math.Min(float64(len(files)), float64(maxAccounts))))
var wg sync.WaitGroup
keysChan := make(chan cryptotypes.PrivKey, maxAccounts)
fmt.Printf("Loading accounts\n")
for i, file := range files {
if i >= maxAccounts {
Expand All @@ -79,15 +78,11 @@ func (sc *SignerClient) GetTestAccountsKeys(maxAccounts int) []cryptotypes.PrivK
go func(i int, fileName string) {
defer wg.Done()
key := sc.GetKey(fmt.Sprint(i), "test", filepath.Join(userHomeDir, "test_accounts", fileName))
keysChan <- key
testAccountsKeys[i] = key
}(i, file.Name())
}
wg.Wait()
close(keysChan)
// Collect keys from the channel
for key := range keysChan {
testAccountsKeys = append(testAccountsKeys, key)
}
fmt.Printf("Finished loading %d accounts \n", len(testAccountsKeys))

return testAccountsKeys
}
Expand Down
1 change: 0 additions & 1 deletion loadtest/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ func SendTx(
loadtestClient LoadTestClient,
sentCount *int64,
) {

grpcRes, _ := loadtestClient.GetTxClient().BroadcastTx(
ctx,
&typestx.BroadcastTxRequest{
Expand Down
Loading