lib/bitcoin/protocol/block.rb
# get the (statistical) amount of work that was needed to generate this block.
get the (statistical) amount of work that was needed to generate this block.
get the ( statistical ) amount of work that was needed to generate this block .
def block_work
        target = Bitcoin.decode_compact_bits(@bits).to_i(16)
        return 0 if target <= 0
        (2**256) / (target + 1)
      end
def block_work target = Bitcoin . decode_compact_bits ( @bits ) . to_i ( 16 ) return 0 if target <= 0 ( 2 ** 256 ) / ( target + 1 ) end
get the (statistical) amount of work that was needed to generate this block.
get the ( statistical ) amount of work that was needed to generate this block .