def hash_from_target(target)
      bytes = []
      while target > 0
        bytes << (target % 256)
        target /= 256
      end
      BTC::Data.data_from_bytes(bytes).ljust(32, "\x00".b)
    end
def hash_from_target(target)
      bytes = []
      while target > 0
        bytes << (target % 256)
        target /= 256
      end
      BTC::Data.data_from_bytes(bytes).ljust(32, "\x00".b)
    end
Converts target integer to a binary 32-byte hash.
 bigint -> hash256