Skip to content

Instantly share code, notes, and snippets.

@yidongw
Created December 20, 2018 22:56
Show Gist options
  • Save yidongw/e2457759c9917bf84ee99c69b6ff682b to your computer and use it in GitHub Desktop.
Save yidongw/e2457759c9917bf84ee99c69b6ff682b to your computer and use it in GitHub Desktop.
Perun6
function VCCloseInit(uint vid, address p1, uint cash1, uint subchan1, address Ingrid,
address p2, uint cash2, uint subchan2, uint validity, bytes sig) AliceOrBob public {
require(now > validity && Ingrid == msg.sender && virtual[vid].status == VCStatus.Empty);
CheckVC(vid, p1, cash1, subchan1, Ingrid, p2, cash2, subchan2, validity, sig); // open certificate
virtual[vid] = VirtualContract(p1, cash1, subchan1, Ingrid, p2, cash2, subchan2, validity, VCStatus.Closing, 0, 0, now + closingTime);
EventVCClosingInit(vid);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment