Skip to content

Instantly share code, notes, and snippets.

@yidongw
Created December 20, 2018 23:25
Show Gist options
  • Save yidongw/8cc502b63151281d24119e9d803acd9e to your computer and use it in GitHub Desktop.
Save yidongw/8cc502b63151281d24119e9d803acd9e to your computer and use it in GitHub Desktop.
Perun11
function VCCloseTimeout(uint vid, address p1, uint cash1, uint subchan1, address Ingrid,
address p2, uint cash2, uint subchan2, uint validity, bytes sig) AliceOrBob public {
require(virtual[vid].status != VCStatus.Closed && virtual[vid].status != VCStatus.Timeouted && msg.sender != Ingrid);
CheckVC(vid, p1, cash1, subchan1, Ingrid, p2, cash2, subchan2, validity, sig);
if (now > validity + 2 * closingTime) {
virtual[vid].status = VCStatus.Timeouted;
virtual[vid].Ingrid = Ingrid;
virtual[vid].timeout = now + closingTime;
EventVCClosing(vid);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment