Skip to content

Commit

Permalink
Minor simulator fixes (#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
darioush authored Jun 28, 2023
1 parent c2f010b commit 3a6c74a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/simulator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To start a single node network, follow the instructions from the AvalancheGo [RE
Once you've built AvalancheGo, open the AvalancheGo directory in a separate terminal window and run a single node non-staking network with the following command:

```bash
./build/avalanchego --staking-enabled=false --network-id=local
./build/avalanchego --sybil-protection-enabled=false --network-id=local
```

WARNING:
Expand Down
2 changes: 1 addition & 1 deletion cmd/simulator/load/funder.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func DistributeFunds(ctx context.Context, client ethclient.Client, keys []*key.K
if err != nil {
return nil, fmt.Errorf("failed to fetch balance for addr %s: %w", addr, err)
}
log.Info("Funded address has balance", "balance", balance)
log.Info("Funded address has balance", "addr", addr, "balance", balance)
}
fundedKeys = append(fundedKeys, needFundsKeys...)
return fundedKeys, nil
Expand Down
10 changes: 5 additions & 5 deletions cmd/simulator/txs/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ func (a issueNAgent[T]) Execute(ctx context.Context) error {

for {
var (
txs = make([]T, 0, a.n)
tx T
done bool
txs = make([]T, 0, a.n)
tx T
ok bool
)
for i := uint64(0); i < a.n; i++ {
select {
case tx, done = <-txChan:
if done {
case tx, ok = <-txChan:
if !ok {
return a.worker.Close(ctx)
}
case <-ctx.Done():
Expand Down

0 comments on commit 3a6c74a

Please sign in to comment.