Method: Bitcoin::Client#latest_remote_block_height
- Defined in:
- lib/bc.rb
#latest_remote_block_height ⇒ Object
This returns the height of the last processed block according to blockexplorer.com. Be cautious—this information is provided by a third party! This method may raise exceptions of numerous different types.
677 678 679 680 681 682 |
# File 'lib/bc.rb', line 677 def latest_remote_block_height con = Net::HTTP.new('blockexplorer.com', 443) con.use_ssl = true con.get((testnet? ? '/testnet' : '') + '/q/getblockcount').body.to_i end |