Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerKSI committed Feb 11, 2024
1 parent 405ec46 commit 9132a15
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion x/bank/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ func (k WrappedBankKeeper) BurnCoins(ctx sdk.Context, moduleName string, amt sdk
}

// Instead of burning coins, we send them to the community pool.
_ = k.SendCoinsFromModuleToModule(ctx, moduleName, distrtypes.ModuleName, amt)
err := k.SendCoinsFromModuleToModule(ctx, moduleName, distrtypes.ModuleName, amt)
if err != nil {
return err
}

feePool := k.distrKeeper.GetFeePool(ctx)
feePool.CommunityPool = feePool.CommunityPool.Add(sdk.NewDecCoinsFromCoins(amt...)...)
k.distrKeeper.SetFeePool(ctx, feePool)
Expand Down
12 changes: 6 additions & 6 deletions yoda/executor/rest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ func createDefaultServer() *httptest.Server {
}))
}

func createResponseNotOkSenarioServer() *httptest.Server {
func createResponseNotOkScenarioServer() *httptest.Server {
return httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
res.WriteHeader(500)
}))
}

func createCannotDecodeJSONSenarioServer() *httptest.Server {
func createCannotDecodeJSONScenarioServer() *httptest.Server {
return httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
res.WriteHeader(200)
_, _ = res.Write([]byte("invalid bytes"))
}))
}

func createExecuteFailSenarioServer() *httptest.Server {
func createExecuteFailScenarioServer() *httptest.Server {
return httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
res.WriteHeader(200)
ret := externalExecutionResponse{
Expand Down Expand Up @@ -68,7 +68,7 @@ func TestExecuteBadUrlFail(t *testing.T) {
}

func TestExecuteDecodeStructFail(t *testing.T) {
testServer := createCannotDecodeJSONSenarioServer()
testServer := createCannotDecodeJSONScenarioServer()
defer func() { testServer.Close() }()

executor := NewRestExec(testServer.URL, 1*time.Second)
Expand All @@ -77,7 +77,7 @@ func TestExecuteDecodeStructFail(t *testing.T) {
}

func TestExecuteResponseNotOk(t *testing.T) {
testServer := createResponseNotOkSenarioServer()
testServer := createResponseNotOkScenarioServer()
defer func() { testServer.Close() }()

executor := NewRestExec(testServer.URL, 1*time.Second)
Expand All @@ -86,7 +86,7 @@ func TestExecuteResponseNotOk(t *testing.T) {
}

func TestExecuteFail(t *testing.T) {
testServer := createExecuteFailSenarioServer()
testServer := createExecuteFailScenarioServer()
defer func() { testServer.Close() }()

executor := NewRestExec(testServer.URL, 1*time.Second)
Expand Down

0 comments on commit 9132a15

Please sign in to comment.