lib/sibit/blockchain.rb in sibit-0.21.1 vs lib/sibit/blockchain.rb in sibit-0.21.2

- old
+ new

@@ -56,20 +56,21 @@ @log.info("The price of BTC is #{price} USD") price end # Get hash of the block after this one. - def next_of(hash) - json = Sibit::Json.new(http: @http, log: @log).get( - URI("https://blockchain.info/rawblock/#{hash}") - ) - nxt = json['next_block'][0] - if nxt.nil? - @log.info("There is no block after #{hash}") - else - @log.info("The next block of #{hash} is #{nxt}") - end - nxt + def next_of(_hash) + raise Sibit::NotSupportedError, 'next_of() in Blockchain API is broken, always returns NULL' + # json = Sibit::Json.new(http: @http, log: @log).get( + # URI("https://blockchain.info/rawblock/#{hash}") + # ) + # nxt = json['next_block'][0] + # if nxt.nil? + # @log.info("There is no block after #{hash}") + # else + # @log.info("The next block of #{hash} is #{nxt}") + # end + # nxt end # The height of the block. def height(hash) json = Sibit::Json.new(http: @http, log: @log).get(