Skip to content

Commit 4adcd58

Browse files
committed
fix: remove ancient 'resolver' vatSlot type
A long long time ago, we represented both Promises and their associated Resolver as distinct reference types (`p+NN` and `r+NN`). We've since changed the model to only represent Promises, and to track who has resolution authority by watching the `p+NN` references get used in the `result:` field of messages going back and forth. Apparently I forgot to delete the code in `parseVatSlots.js` which classified `r+NN` as a resolver.
1 parent 3a98491 commit 4adcd58

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

packages/SwingSet/src/parseVatSlots.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { assert } from '@agoric/assert';
2222
/**
2323
* Parse a vat slot reference string into a vat slot object:
2424
* {
25-
* type: STRING, // 'object', 'device', 'promise', or 'resolver'
25+
* type: STRING, // 'object', 'device', 'promise'
2626
* allocatedByVat: BOOL, // true=>allocated by vat, false=>by the kernel
2727
* id: Nat
2828
* }
@@ -47,8 +47,6 @@ export function parseVatSlot(s) {
4747
type = 'device';
4848
} else if (typechar === 'p') {
4949
type = 'promise';
50-
} else if (typechar === 'r') {
51-
type = 'resolver';
5250
} else {
5351
throw new Error(`invalid vatSlot ${s}`);
5452
}
@@ -68,7 +66,7 @@ export function parseVatSlot(s) {
6866
/**
6967
* Generate a vat slot reference string given a type, ownership, and id.
7068
*
71-
* @param type The type, 'object', 'device', 'promise', or 'resolver'
69+
* @param type The type, 'object', 'device', 'promise'
7270
* @param allocatedByVat Flag: true=>vat allocated, false=>kernel allocated
7371
* @param id The id, a Nat.
7472
*
@@ -93,9 +91,6 @@ export function makeVatSlot(type, allocatedByVat, id) {
9391
if (type === 'promise') {
9492
return `p${idSuffix}`;
9593
}
96-
if (type === 'resolver') {
97-
return `r${idSuffix}`;
98-
}
9994
throw new Error(`unknown type ${type}`);
10095
}
10196

0 commit comments

Comments
 (0)