From 186dd942af1c90f15a3da4a0922e2b542a51dee2 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 17 Dec 2024 13:58:12 -0800 Subject: [PATCH] fixup! feat: operator majority logic --- .../fast-usdc/test/fast-usdc.contract.test.ts | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/packages/fast-usdc/test/fast-usdc.contract.test.ts b/packages/fast-usdc/test/fast-usdc.contract.test.ts index f7869f3def1..2b6754f470a 100644 --- a/packages/fast-usdc/test/fast-usdc.contract.test.ts +++ b/packages/fast-usdc/test/fast-usdc.contract.test.ts @@ -1,8 +1,11 @@ import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js'; import type { ExecutionContext, TestFn } from 'ava'; +import { + decodeAddressHook, + encodeAddressHook, +} from '@agoric/cosmic-proto/address-hooks.js'; import { AmountMath } from '@agoric/ertp/src/amountMath.js'; -import { deeplyFulfilledObject } from '@agoric/internal'; import { eventLoopIteration, inspectMapStore, @@ -24,13 +27,9 @@ import { import type { Instance } from '@agoric/zoe/src/zoeService/utils.js'; import { setUpZoeForTest } from '@agoric/zoe/tools/setup-zoe.js'; import { E } from '@endo/far'; -import { matches, objectMap } from '@endo/patterns'; +import { matches } from '@endo/patterns'; import { makePromiseKit } from '@endo/promise-kit'; import path from 'path'; -import { - decodeAddressHook, - encodeAddressHook, -} from '@agoric/cosmic-proto/address-hooks.js'; import type { OperatorKit } from '../src/exos/operator-kit.js'; import type { FastUsdcSF } from '../src/fast-usdc.contract.js'; import { PoolMetricsShape } from '../src/type-guards.js'; @@ -59,7 +58,7 @@ const getInvitationProperties = async ( type CommonSetup = Awaited>; const startContract = async ( common: Pick, - operatorQty = 1, + operatorQty = 3, ) => { const { brands: { usdc }, @@ -749,7 +748,6 @@ test.todo('C18 - forward - MUST log and alert these incidents'); test.serial('Settlement for unknown transaction (operator down)', async t => { const { - sync, bridges: { snapshot, since }, evm: { cctp, txPub }, common: { @@ -758,12 +756,8 @@ test.serial('Settlement for unknown transaction (operator down)', async t => { }, mint, } = t.context; - const operators = await sync.ocw.promise; - const opDown = makeCustomer('Otto', cctp, txPub.publisher, feeConfig); - // what removeOperator will do - await E(E.get(E(operators[1]).getKit()).admin).disable(); const bridgePos = snapshot(); const sent = await opDown.sendFast(t, 20_000_000n, 'osmo12345'); await mint(sent); @@ -785,12 +779,10 @@ test.serial('Settlement for unknown transaction (operator down)', async t => { ], '20 USDC arrive at the settlement account', ); + // FIXME why shouldn't there be an advance? t.deepEqual(bridgeTraffic.local, [], 'no IBC transfers'); await transmitTransferAck(); - t.deepEqual(await E(operators[1]).getFailures(), [ - 'submitEvidence for disabled operator', - ]); }); test.todo(