function autoMine() {
    // Variable difficulty for auto-mine
    var diff = parseInt(diffBox.value, 10)

    var parent = getParent()
    var word = getWord()
    var nonce = getNonce()
    var oldHash
    for (var hash = ""; hash !== oldHash && hash.slice(0, diff) !== "0".repeat(diff); nonce++) {

      oldHash = hash
      hash = getHash(parent, word, nonce)
    }
    nonceBox.value = --nonce

    hashFromDOM()
  }
/**
   * Automatically mines until a block with appropriate difficulty
   */
Automatically mines until a block with appropriate difficulty
Automatically mines until a block with appropriate difficulty
function autoMine() {
    var diff = parseInt(diffBox.value, 10)
    var parent = getParent()
    var word = getWord()
    var nonce = getNonce()
    var oldHash
    for (var hash = ""; hash !== oldHash && hash.slice(0, diff) !== "0".repeat(diff); nonce++) {
      oldHash = hash
      hash = getHash(parent, word, nonce)
    }
    nonceBox.value = --nonce
    hashFromDOM()
  }
function autoMine ( ) { var diff = parseInt ( diffBox . value , 10 ) var parent = getParent ( ) var word = getWord ( ) var nonce = getNonce ( ) var oldHash for ( var hash = "" ; hash !== oldHash && hash . slice ( 0 , diff ) !== "0" . repeat ( diff ) ; nonce ++ ) { oldHash = hash hash = getHash ( parent , word , nonce ) } nonceBox . value = -- nonce hashFromDOM ( ) }
Automatically mines until a block with appropriate difficulty
Automatically mines until a block with appropriate difficulty
// Variable difficulty for auto-mine