Skip to content

Instantly share code, notes, and snippets.

@yidongw
Created December 20, 2018 23:21
Show Gist options
  • Save yidongw/a5f834f913c5893137c75eccf6683acd to your computer and use it in GitHub Desktop.
Save yidongw/a5f834f913c5893137c75eccf6683acd to your computer and use it in GitHub Desktop.
Perun10
function VCCloseFinalTimeout(uint vid) AliceOrBob public {
VirtualContract memory vc = virtual[vid];
require(vc.status == VCStatus.ClosingFinal && msg.sender == vc.Ingrid);
if (now > vc.timeout) {
alice.totalTransfers += int(vc.cashFinal1) - int(vc.cash1);
bob.totalTransfers += int(vc.cashFinal2) - int(vc.cash2);
virtual[vid].status = VCStatus.Closed;
EventClosed();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment