Skip to content

Commit

Permalink
test: unknown transaction (WIP. failing)
Browse files Browse the repository at this point in the history
settler should Leave funds in SettlementAccount.
  • Loading branch information
dckc committed Nov 26, 2024
1 parent 52a4bc7 commit 1719797
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions packages/fast-usdc/test/fast-usdc.contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ test.serial('racers', async t => {
await Promise.all([mint(sent1), mint(sent2), mint(sent3)]);
});

test.serial('operator down', async t => {
test.serial('Settlement for unknown transaction (operator down)', async t => {
const {
sync,
bridges: { snapshot, since },
Expand All @@ -940,14 +940,30 @@ test.serial('operator down', async t => {

// what removeOperator will do
await E(E.get(E(operators[1]).getKit()).admin).disable();
{
const bridgePos = snapshot();
const sent = await opDown.send(20_000_000n, 'osmo12345');
const bridgeTraffic = since(bridgePos);
await mint(sent);
opDown.checkSent(bridgeTraffic, 'forward');
await transmitTransferAck();
}
const bridgePos = snapshot();
const sent = await opDown.send(20_000_000n, 'osmo12345');
await mint(sent);
const bridgeTraffic = since(bridgePos);

t.like(
bridgeTraffic.bank,
[
{
amount: '20000000',
sender: 'faucet',
type: 'VBANK_GRAB',
},
{
amount: '20000000',
recipient: 'agoric1fakeLCAAddress1',
type: 'VBANK_GIVE',
},
],
'20 USDC arrive at the settlement account',
);
t.deepEqual(bridgeTraffic.local, [], 'no IBC transfers');

await transmitTransferAck();
t.deepEqual(await E(operators[1]).getFailures(), [
'submitEvidence for disabled operator',
]);
Expand Down

0 comments on commit 1719797

Please sign in to comment.