Merge PR #105: Fix Module Account Blacklisting in GaiaApp

This commit is contained in:
colin axner
2019-08-15 15:30:10 -07:00
committed by Alexander Bezobchuk
parent 72a5f93310
commit 5cad07140d
2 changed files with 12 additions and 2 deletions

View File

@@ -5,8 +5,8 @@ import (
"testing"
"github.com/stretchr/testify/require"
"github.com/tendermint/tm-db"
"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tm-db"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/simapp"
@@ -25,6 +25,16 @@ func TestGaiadExport(t *testing.T) {
require.NoError(t, err, "ExportAppStateAndValidators should not have an error")
}
// ensure that black listed addresses are properly set in bank keeper
func TestBlackListedAddrs(t *testing.T) {
db := db.NewMemDB()
app := NewGaiaApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0)
for acc := range maccPerms {
require.True(t, app.bankKeeper.BlacklistedAddr(app.supplyKeeper.GetModuleAddress(acc)))
}
}
func setGenesis(gapp *GaiaApp) error {
genesisState := simapp.NewDefaultGenesisState()