-
-
Save matheusml/9c7e4252ccded53f7d1cdafb6f5a53e3 to your computer and use it in GitHub Desktop.
This file contains 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
mine() { | |
this.hash = this.generateHash() | |
while (!(/^0*$/.test(this.hash.substring(0, this.difficulty)))) { | |
this.nonce++ | |
this.hash = this.generateHash() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment