Methods
B
F
N
P
R
S
V
Class Public methods
new(rpc)
# File lib/nanook/node.rb, line 4
def initialize(rpc)
  @rpc = rpc
end
Instance Public methods
block_count()
# File lib/nanook/node.rb, line 8
def block_count
  rpc(:block_count)
end
block_count_type()
# File lib/nanook/node.rb, line 12
def block_count_type
  rpc(:block_count_type)
end
bootstrap(address:, port:)
# File lib/nanook/node.rb, line 16
def bootstrap(address:, port:)
  rpc(:bootstrap, address: address, port: port).has_key?(:success)
end
bootstrap_any()
# File lib/nanook/node.rb, line 20
def bootstrap_any
  rpc(:bootstrap_any).has_key?(:success)
end
frontier_count()
# File lib/nanook/node.rb, line 24
def frontier_count
  rpc(:frontier_count)[:count]
end
peers()
# File lib/nanook/node.rb, line 32
def peers
  rpc(:peers)[:peers]
end
representatives()
# File lib/nanook/node.rb, line 36
def representatives
  rpc(:representatives)[:representatives]
end
stop()
# File lib/nanook/node.rb, line 40
def stop
  rpc(:stop).has_key?(:success)
end
sync_progress()
# File lib/nanook/node.rb, line 44
def sync_progress
  response = rpc(:block_count)

  count = response[:count]
  unchecked = response[:unchecked]
  total =  count + unchecked

  count.to_f * 100 / total.to_f
end
synced?()
# File lib/nanook/node.rb, line 54
def synced?
  rpc(:block_count)[:unchecked] == 0
end
version()
# File lib/nanook/node.rb, line 58
def version
  rpc(:version)
end