Skip to content

Commit

Permalink
Merge pull request #408 from Agoric/bugFix
Browse files Browse the repository at this point in the history
BUGFIX: deliverOneMessage() accidentally skipped insist() msgs.
  • Loading branch information
Chris-Hibbert authored Jan 14, 2020
2 parents 755ebbd + d1cb43f commit 0bc5ca1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/SwingSet/src/kernel/vatManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,10 @@ export default function makeVatManager(
async function deliverOneMessage(target, msg) {
insistMessage(msg);
const targetSlot = mapKernelSlotToVatSlot(target);
if (targetSlot.type === 'object') {
const { type } = parseVatSlot(targetSlot);
if (type === 'object') {
insist(parseVatSlot(targetSlot).allocatedByVat, `deliver() to wrong vat`);
} else if (targetSlot.type === 'promise') {
} else if (type === 'promise') {
const p = kernelKeeper.getKernelPromise(target);
insist(p.decider === vatID, `wrong decider`);
}
Expand Down

0 comments on commit 0bc5ca1

Please sign in to comment.