Skip to content

Commit

Permalink
chore: don't rely on getting old auctioneer instance
Browse files Browse the repository at this point in the history
The vaults upgrade consumed instance.auctioneer and compared it to the
new instance, passed from the new auctioneer proposal in a single-use
promise, and failed if they weren't different. In this software
upgrade, the instance.auctioneer value might be the new value, so this
test can fail. Since the single-use promise comes directly from the
new auction proposal, if it has a value, it's the new one.
  • Loading branch information
Chris-Hibbert committed Oct 24, 2024
1 parent 94a856d commit b953eae
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions packages/inter-protocol/src/proposals/upgrade-vaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ export const upgradeVaults = async (
auctionUpgradeNewInstance: auctionUpgradeNewInstanceProducer,
newContractGovBundleId: newContractGovBundleIdErasor,
},
instance: {
consume: { auctioneer: auctioneerInstanceP },
},
},
{ options: { VaultFactoryBundle: vaultBundleRef } },
) => {
Expand All @@ -52,12 +49,7 @@ export const upgradeVaults = async (

await priceAuthority8400;

const [auctionOldInstance, auctionNewInstance] = await Promise.all([
auctioneerInstanceP,
auctionUpgradeNewInstance,
]);
auctionOldInstance !== auctionNewInstance ||
Fail`Auction instance didn't change`;
const auctionNewInstance = await auctionUpgradeNewInstance;
auctionUpgradeNewInstanceProducer.reset();
const publicFacet = E(zoe).getPublicFacet(auctionNewInstance);
/** @type {import('@agoric/inter-protocol/src/auction/scheduler.js').FullSchedule} */
Expand Down Expand Up @@ -202,7 +194,6 @@ export const getManifestForUpgradeVaults = async (
auctionUpgradeNewInstance: uV,
newContractGovBundleId: uV,
},
instance: { consume: { auctioneer: uV } },
},
},
installations: { VaultFactory: restoreRef(VaultFactoryRef) },
Expand Down

0 comments on commit b953eae

Please sign in to comment.