Class: Bitcoin::ChainParams

Inherits:
Object
  • Object
show all
Defined in:
lib/block_io/extended_bitcoinrb.rb

Class Method Summary collapse

Class Method Details

.get(network) ⇒ Object



19
20
21
# File 'lib/block_io/extended_bitcoinrb.rb', line 19

def self.get(network)
  init(network)
end

.init(name) ⇒ Object



23
24
25
26
27
# File 'lib/block_io/extended_bitcoinrb.rb', line 23

def self.init(name)
  i = YAML.safe_load(File.open("#{__dir__}/chainparams/#{name}.yml"), :permitted_classes => [Bitcoin::ChainParams])
  i.dust_relay_fee ||= Bitcoin::DUST_RELAY_TX_FEE
  i
end