diff --git a/x/bank/keeper/keeper.go b/x/bank/keeper/keeper.go index 3288d7cdd..aa479555a 100644 --- a/x/bank/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -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) diff --git a/yoda/executor/rest_test.go b/yoda/executor/rest_test.go index c4f88c888..f50fad80f 100644 --- a/yoda/executor/rest_test.go +++ b/yoda/executor/rest_test.go @@ -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{ @@ -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) @@ -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) @@ -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)