class Blockchain::Transaction
Attributes
block_height[R]
double_spend[R]
hash[R]
inputs[R]
outputs[R]
relayed_by[R]
size[R]
time[R]
tx_index[R]
version[R]
Public Class Methods
new(t)
click to toggle source
# File lib/blockchain/blockexplorer.rb, line 329 def initialize(t) @double_spend = t.fetch('double_spend', false) @block_height = t.fetch('block_height', false) @time = t['time'] @relayed_by = t['relayed_by'] @hash = t['hash'] @tx_index = t['tx_index'] @version = t['ver'] @size = t['size'] @inputs = t['inputs'].map{ |i| Input.new(i) } @outputs = t['out'].map{ |o| Output.new(o) } if @block_height.nil? @block_height = -1 end end
Public Instance Methods
adjust_block_height(h)
click to toggle source
# File lib/blockchain/blockexplorer.rb, line 346 def adjust_block_height(h) @block_height = h end