Skip to content

Commit

Permalink
style: fix lint erros
Browse files Browse the repository at this point in the history
  • Loading branch information
ninabarbakadze committed Sep 20, 2024
1 parent 1e1de7f commit def40f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/user/pruning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ func TestPruningInTxTracker(t *testing.T) {
txClient.txTracker["tx"+fmt.Sprint(i)] = txInfo{
signer: "signer" + fmt.Sprint(i),
sequence: uint64(i),
timeStamp: time.Now().
timestamp: time.Now().
Add(-10 * time.Minute),
}
txsToBePruned++
} else {
txClient.txTracker["tx"+fmt.Sprint(i)] = txInfo{
signer: "signer" + fmt.Sprint(i),
sequence: uint64(i),
timeStamp: time.Now().
timestamp: time.Now().
Add(-5 * time.Minute),
}
txsNotReadyToBePruned++
Expand Down
4 changes: 2 additions & 2 deletions pkg/user/tx_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func (client *TxClient) broadcastTx(ctx context.Context, txBytes []byte, signer
client.txTracker[resp.TxResponse.TxHash] = txInfo{
sequence: client.signer.accounts[signer].Sequence(),
signer: signer,
timeStamp: time.Now(),
timestamp: time.Now(),
}

// after the transaction has been submitted, we can increment the
Expand All @@ -412,7 +412,7 @@ func (client *TxClient) broadcastTx(ctx context.Context, txBytes []byte, signer
// pruneTxTracker removes transactions from the local tx tracker that are older than 10 minutes
func (client *TxClient) pruneTxTracker() {
for hash, txInfo := range client.txTracker {
if time.Since(txInfo.timeStamp) >= txTrackerPruningInterval {
if time.Since(txInfo.timestamp) >= txTrackerPruningInterval {
delete(client.txTracker, hash)
}
}
Expand Down

0 comments on commit def40f2

Please sign in to comment.