Created
December 20, 2018 23:37
-
-
Save yidongw/2dadb2cdd5c90a6d96ffd4e159aaf721 to your computer and use it in GitHub Desktop.
Perun13
This file contains hidden or 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
function VCAlreadyClosed(uint vid, bytes sig) AliceOrBob public { | |
require((msg.sender != virtual[vid].Ingrid && (virtual[vid].status == VCStatus.Closing || virtual[vid].status == VCStatus.ClosingFinal)) || | |
(msg.sender == virtual[vid].Ingrid && virtual[vid].status == VCStatus.Timeouted)); | |
bytes32 msgHash = keccak256(vid, alreadyClosed); | |
require(libSignatures.verify(Other(msg.sender, alice.id, bob.id), msgHash, sig)); | |
EventClosed(); | |
selfdestruct(msg.sender); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment