Class: Peatio::Nem2::Blockchain

Inherits:
Blockchain::Abstract
  • Object
show all
Defined in:
lib/peatio/nem2/blockchain.rb

Overview

TODO: Processing of unconfirmed transactions from mempool isn’t supported now.

Constant Summary collapse

DEFAULT_FEATURES =
{case_sensitive: true, cash_addr_format: false}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(custom_features = {}) ⇒ Blockchain

Returns a new instance of Blockchain.



8
9
10
11
# File 'lib/peatio/nem2/blockchain.rb', line 8

def initialize(custom_features = {})
  @features = DEFAULT_FEATURES.merge(custom_features).slice(*SUPPORTED_FEATURES)
  @settings = {}
end

Instance Method Details

#configure(settings = {}) ⇒ Object



13
14
15
16
17
# File 'lib/peatio/nem2/blockchain.rb', line 13

def configure(settings = {})
  # Clean client state during configure.
  @client = nil
  @settings.merge!(settings.slice(*SUPPORTED_SETTINGS))
end