Skip to content

Commit

Permalink
chore: rename Waits() to Wait()
Browse files Browse the repository at this point in the history
  • Loading branch information
jinsan-line committed Jan 25, 2021
1 parent 5ac1c56 commit cc6f354
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (app *BaseApp) CheckTxSync(req abci.RequestCheckTx) abci.ResponseCheckTx {

waits, signals := app.checkAccountWGs.Register(tx)

app.checkAccountWGs.Waits(waits)
app.checkAccountWGs.Wait(waits)
defer app.checkAccountWGs.Done(signals)

gInfo, err := app.checkTx(req.Tx, tx, req.Type == abci.CheckTxType_Recheck)
Expand Down
2 changes: 1 addition & 1 deletion baseapp/accountwgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (aw *AccountWGs) Register(tx sdk.Tx) (waits []*sync.WaitGroup, signals []*A
return waits, signals
}

func (aw *AccountWGs) Waits(waits []*sync.WaitGroup) {
func (aw *AccountWGs) Wait(waits []*sync.WaitGroup) {
for _, wait := range waits {
wait.Wait()
}
Expand Down
2 changes: 1 addition & 1 deletion baseapp/accountwgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestRegister(t *testing.T) {
func TestDontPanicWithNil(t *testing.T) {
app := setupBaseApp(t)

require.NotPanics(t, func() { app.checkAccountWGs.Waits(nil) })
require.NotPanics(t, func() { app.checkAccountWGs.Wait(nil) })
require.NotPanics(t, func() { app.checkAccountWGs.Done(nil) })
}

Expand Down
2 changes: 1 addition & 1 deletion baseapp/reactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (app *BaseApp) prepareCheckTx(req *RequestCheckTxAsync) {
}

func (app *BaseApp) checkTxAsync(req *RequestCheckTxAsync, waits []*sync.WaitGroup, signals []*AccountWG) {
app.checkAccountWGs.Waits(waits)
app.checkAccountWGs.Wait(waits)
defer app.checkAccountWGs.Done(signals)

gInfo, err := app.checkTx(req.txBytes, req.tx, req.recheck)
Expand Down

0 comments on commit cc6f354

Please sign in to comment.