Skip to content

Commit

Permalink
fix(chain-info): Normalize IBC connection info storage
Browse files Browse the repository at this point in the history
- Add `reverseConnInfo` utility to flip connection info perspective
- Modify `registerChain` to normalize connection info before storage
- Ensure consistent storage based on lexicographically smaller chain ID
  • Loading branch information
0xpatrickdev committed Jul 14, 2024
1 parent 80186ac commit 444f3d6
Show file tree
Hide file tree
Showing 4 changed files with 158 additions and 107 deletions.
22 changes: 20 additions & 2 deletions packages/boot/test/bootstrapTests/orchestration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,24 @@ test.serial('config', async t => {
node: 'agoricNames.chainConnection',
});
}
{
const connection = await EV(agoricNames).lookup(
'chainConnection',
'agoric-3_osmosis-1',
);
t.like(connection, {
id: 'connection-1',
client_id: '07-tendermint-1',
counterparty: {
client_id: '07-tendermint-2109',
connection_id: 'connection-1649',
},
transferChannel: {
counterPartyChannelId: 'channel-320',
channelId: 'channel-1',
},
});
}
});

test.skip('stakeOsmo - queries', async t => {
Expand Down Expand Up @@ -223,8 +241,8 @@ test.serial('revise chain info', async t => {
'cosmoshub-4_hot-1',
);
t.like(connection, {
id: 'connection-99',
client_id: '07-tendermint-3',
id: 'connection-1',
client_id: '07-tendermint-2',
});
});

Expand Down
Loading

0 comments on commit 444f3d6

Please sign in to comment.