(t *testing.T)
| 219 | } |
| 220 | |
| 221 | func TestSimAppExportAndBlockedAddrs(t *testing.T) { |
| 222 | encCfg := MakeTestEncodingConfig() |
| 223 | db := dbm.NewMemDB() |
| 224 | app := NewSifApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) |
| 225 | SetConfig(false) |
| 226 | for acc := range maccPerms { |
| 227 | require.True( |
| 228 | t, |
| 229 | app.BankKeeper.BlockedAddr(app.AccountKeeper.GetModuleAddress(acc)), |
| 230 | "ensure that blocked addresses are properly set in bank keeper", |
| 231 | ) |
| 232 | } |
| 233 | |
| 234 | genesisState := NewDefaultGenesisState(encCfg.Marshaler) |
| 235 | stateBytes, err := json.MarshalIndent(genesisState, "", " ") |
| 236 | require.NoError(t, err) |
| 237 | |
| 238 | // Initialize the chain |
| 239 | app.InitChain( |
| 240 | abci.RequestInitChain{ |
| 241 | Validators: []abci.ValidatorUpdate{}, |
| 242 | AppStateBytes: stateBytes, |
| 243 | }, |
| 244 | ) |
| 245 | app.Commit() |
| 246 | |
| 247 | // Making a new app object with the db, so that initchain hasn't been called |
| 248 | app2 := NewSifApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) |
| 249 | _, err = app2.ExportAppStateAndValidators(false, []string{}) |
| 250 | require.NoError(t, err, "ExportAppStateAndValidators should not have an error") |
| 251 | } |
| 252 | |
| 253 | func TestAddressFormatValidation(t *testing.T) { |
| 254 | addr0 := make([]byte, 0) |
nothing calls this directly
no test coverage detected