From ccdb5d668ba335cdd3037e9d93d0b46cad405d7b Mon Sep 17 00:00:00 2001 From: Chris Hibbert Date: Tue, 26 Nov 2024 16:27:53 -0800 Subject: [PATCH] chore: better comments and cleanups --- a3p-integration/proposals/p:upgrade-19/.gitignore | 1 - a3p-integration/proposals/p:upgrade-19/eval.sh | 2 +- .../proposals/p:upgrade-19/upgradedBoard.test.js | 1 + .../scripts/testing/replace-feeDistributor-short.js | 6 ++++++ packages/vats/src/proposals/testUpgradedBoard.js | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/a3p-integration/proposals/p:upgrade-19/.gitignore b/a3p-integration/proposals/p:upgrade-19/.gitignore index ddb849d54e6..17bb7d663e2 100644 --- a/a3p-integration/proposals/p:upgrade-19/.gitignore +++ b/a3p-integration/proposals/p:upgrade-19/.gitignore @@ -1,3 +1,2 @@ replaceFeeDistributor/ testUpgradedBoard/ -upgradeBoard/ diff --git a/a3p-integration/proposals/p:upgrade-19/eval.sh b/a3p-integration/proposals/p:upgrade-19/eval.sh index b611d3f2377..11e431ba1cc 100644 --- a/a3p-integration/proposals/p:upgrade-19/eval.sh +++ b/a3p-integration/proposals/p:upgrade-19/eval.sh @@ -1,6 +1,6 @@ #!/bin/bash -# add gov4 address +# evaluate the proposals in the /submission/ directory echo "UPGRADE-19 Running proposal declared in package.json" # copy to run in the proposal package so the dependencies can be resolved diff --git a/a3p-integration/proposals/p:upgrade-19/upgradedBoard.test.js b/a3p-integration/proposals/p:upgrade-19/upgradedBoard.test.js index f1956e99ab1..c72b130c7f3 100644 --- a/a3p-integration/proposals/p:upgrade-19/upgradedBoard.test.js +++ b/a3p-integration/proposals/p:upgrade-19/upgradedBoard.test.js @@ -8,6 +8,7 @@ import test from 'ava'; import { evalBundles } from '@agoric/synthetic-chain'; test('test upgraded board', async t => { + // agoricProposal.sdk-generate in package.json generates this proposal await evalBundles('testUpgradedBoard'); t.pass(); diff --git a/packages/builders/scripts/testing/replace-feeDistributor-short.js b/packages/builders/scripts/testing/replace-feeDistributor-short.js index 399f10af587..2cad2cca9ad 100644 --- a/packages/builders/scripts/testing/replace-feeDistributor-short.js +++ b/packages/builders/scripts/testing/replace-feeDistributor-short.js @@ -1,6 +1,12 @@ import { makeHelpers } from '@agoric/deploy-script-support'; import { getManifestForReplaceFeeDistributor } from '@agoric/inter-protocol/src/proposals/replace-fee-distributor.js'; +/** + * @file + * a Variant of ../inter-protocol/replace-feeDistributor.js that shortens the + * collectionInterval for testing + */ + /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ export const defaultProposalBuilder = async (_, opts) => { console.log('feeDist OPTS', opts); diff --git a/packages/vats/src/proposals/testUpgradedBoard.js b/packages/vats/src/proposals/testUpgradedBoard.js index 7289c6bc60c..78b21079d0a 100644 --- a/packages/vats/src/proposals/testUpgradedBoard.js +++ b/packages/vats/src/proposals/testUpgradedBoard.js @@ -12,13 +12,13 @@ export const testUpgradedBoard = async ({ const thing1Id = await E(board).getId(thing1); assert(thing1Id.match(/^board0[0-9]+$/)); - // /////// can we retrieve something stored long ago? //////// const marshaller = await E(board).getReadonlyMarshaller(); assert(marshaller, 'expected a marshaller'); const stableBrand = await stableBrandP; // /////// can we retrieve a well-known object via its ID? //////// const stableID = await E(board).getId(stableBrand); + // /////// can we retrieve something stored long ago? //////// const stableBrandRetrieved = await E(board).getValue(stableID); assert(stableBrandRetrieved === stableBrand, 'retrieved matching brand'); };