Skip to content

Commit

Permalink
fix: don't reset x/capability state on new chains; it's sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Dec 10, 2020
1 parent f9441f4 commit 6ba739e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/agoric-cli/lib/chain-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,15 @@ export function finishCosmosGenesis({ genesisJson, exportedGenesisJson }) {

// We upgrade from export data.
const { app_state: exportedAppState } = exported;
const { ...initState } = genesis.app_state;
if (exportedAppState) {
genesis.app_state = exportedAppState;
}

// Remove IBC and capability state.
// Remove IBC state.
// TODO: This needs much more support to preserve contract state
// between exports in order to be able to carry forward IBC conns.
delete genesis.app_state.capability;
genesis.app_state.ibc = {
client_genesis: {
create_localhost: true,
},
};
genesis.app_state.ibc = initState.ibc;

genesis.app_state.staking.params.bond_denom = STAKING_DENOM;

Expand Down

0 comments on commit 6ba739e

Please sign in to comment.