Skip to content

Instantly share code, notes, and snippets.

@matheusml matheusml/block.js Secret

Created Dec 6, 2017
What would you like to do?
mine() {
this.hash = this.generateHash()
while (!(/^0*$/.test(this.hash.substring(0, this.difficulty)))) {
this.hash = this.generateHash()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.