mirror of
https://github.com/tornadocash/tornado-core.git
synced 2025-08-12 16:45:23 -04:00
relayhub protection
This commit is contained in:
parent
dee1c6140a
commit
926a4d7298
4 changed files with 15 additions and 7 deletions
|
@ -14,6 +14,7 @@ contract GSNMixer is Mixer, GSNRecipient {
|
|||
) Mixer(_verifier, _mixDenomination, _merkleTreeHeight, _emptyElement, _operator) public {
|
||||
}
|
||||
|
||||
bool couldBeWithdrawn;
|
||||
modifier onlyHub() {
|
||||
require(msg.sender == getHubAddr(), "only relay hub");
|
||||
_;
|
||||
|
@ -27,7 +28,7 @@ contract GSNMixer is Mixer, GSNRecipient {
|
|||
require(isKnownRoot(root), "Cannot find your merkle root"); // Make sure to use a recent one
|
||||
require(verifier.verifyProof(a, b, c, input), "Invalid withdraw proof");
|
||||
nullifierHashes[nullifierHash] = true;
|
||||
|
||||
couldBeWithdrawn = true;
|
||||
// we will process withdraw in postRelayedCall func
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue