class Shilling::Configuration

Constants

COINBASE

note: add a (†) coinbase marker

fix: "sync" with ledger-lite config!!!!
WALLET_ADDRESSES

Attributes

address[RW]

user/node settings

coinbase[RW]

system/blockchain settings

mining_reward[RW]

Public Class Methods

new() click to toggle source
COINBASE = ['Großglockner†', 'Wildspitze†', 'Großvenediger†',
            'Hochfeiler†', 'Zuckerhütl†', 'Hochalmspitze†',
            'Gr. Muntanitz†', 'Hoher Riffler†',
            'Parseierspitze†', 'Hoher Dachstein†'
           ]

end

# File lib/shilling.rb, line 76
def initialize
  ## try default setup via ENV variables
  ## pick "random" address if nil (none passed in)
  @address = ENV[ 'SHILLING_NAME'] || rand_address()

  @coinbase = COINBASE         ## use a different name - why? why not?
                               ##  note: for now is an array (multiple coinbases)
  @mining_reward = 43     ## use country code for austria (43)
end

Public Instance Methods

coinbase?( address ) click to toggle source
# File lib/shilling.rb, line 89
def coinbase?( address )    ## check/todo: use wallet - why? why not? (for now wallet==address)
  @coinbase.include?( address )
end
rand_address() click to toggle source
# File lib/shilling.rb, line 86
def rand_address()      WALLET_ADDRESSES[rand( WALLET_ADDRESSES.size )];  end
rand_coinbase() click to toggle source
# File lib/shilling.rb, line 87
def rand_coinbase()     @coinbase[rand( @coinbase.size )];  end