class XRBP::NodeStore::DB
Base NodeStore
DB
module, the client will use this class through specific DB-type subclass.
Subclasses should define the [ ] (index) method taking key to lookup, returning corresponding NodeStore
value and each method, iterating over nodestore values (see existing subclasses for implementation details)
Public Instance Methods
account(hash)
click to toggle source
Return the NodeStore
Account for the given lookup hash
# File lib/xrbp/nodestore/db.rb, line 40 def account(hash) ledger_entry(hash) end
inner_node(hash)
click to toggle source
Return the NodeStore
InnerNode for the given lookup hash
# File lib/xrbp/nodestore/db.rb, line 59 def inner_node(hash) val = self[hash] return nil if val.nil? parse_inner_node(val) end
ledger(hash)
click to toggle source
ledger_entry(hash)
click to toggle source
tx(hash)
click to toggle source
Return the NodeStore
Transaction for the given lookup hash
# File lib/xrbp/nodestore/db.rb, line 52 def tx(hash) val = self[hash] return nil if val.nil? parse_tx(val) end