datastructures/blockchain.rb
def proof_of_work(block)
    proof = 0
    start = Time.now
    while self.class.valid_proof?(block, proof) == false
      proof += 1
    end
    puts 'Proof found in: ' + (Time.now - start).to_s

    return proof
  end
# Create a proof for a block
Create a proof for a block
Create a proof for a block
def proof_of_work(block)
    proof = 0
    start = Time.now
    while self.class.valid_proof?(block, proof) == false
      proof += 1
    end
    puts 'Proof found in: ' + (Time.now - start).to_s
    return proof
  end
def proof_of_work ( block ) proof = 0 start = Time . now while self . class . valid_proof? ( block , proof ) == false proof += 1 end puts 'Proof found in: ' + ( Time . now - start ) . to_s return proof end
Create a proof for a block
Create a proof for a block
block