-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
117 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/SwingSet/test/vat-admin/terminate/bootstrap-die-with-presence.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { E } from '@agoric/eventual-send'; | ||
|
||
export function buildRootObject(vatPowers) { | ||
const { testLog } = vatPowers; | ||
|
||
const self = harden({ | ||
async bootstrap(vats, devices) { | ||
testLog('preparing dynamic vat'); | ||
const vatMaker = E(vats.vatAdmin).createVatAdminService(devices.vatAdmin); | ||
const dude = await E(vatMaker).createVatByName('dude'); | ||
E(dude.root).dieReturningAPresence(self); | ||
const doneP = E(dude.adminNode).done(); | ||
try { | ||
const doneResult = await doneP; | ||
testLog(`done message: ${doneResult.message}`); | ||
await E(doneResult.emissary).talkBack('from beyond?'); | ||
} catch (e) { | ||
testLog(`done exception ${e} (this should not happen)`); | ||
} | ||
testLog('done'); | ||
}, | ||
|
||
talkBack(arg) { | ||
testLog(`talkback ${arg}`); | ||
}, | ||
}); | ||
return self; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/SwingSet/test/vat-admin/terminate/swingset-die-with-presence.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"bootstrap": "bootstrap", | ||
"bundles": { | ||
"dude": { | ||
"sourceSpec": "vat-dude-terminate.js" | ||
} | ||
}, | ||
"vats": { | ||
"bootstrap": { | ||
"sourceSpec": "bootstrap-die-with-presence.js" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters