lib/zold/tax.rb in zold-0.16.6 vs lib/zold/tax.rb in zold-0.16.7

- old
+ new

@@ -38,11 +38,11 @@ # The maximum allowed amount in one transaction. # The correct amount should be 1 ZLD, but we allow bigger amounts # now since the amount of nodes in the network is still small. When # the network grows up, let's put this number back to 1 ZLD. - MAX_PAYMENT = Amount.new(zld: 16.0) + MAX_PAYMENT = Amount.new(zld: 64.0) # This is how much we charge per one transaction per hour # of storage. A wallet of 4096 transactions will pay # approximately 16ZLD per year. FEE_TXN_HOUR = Amount.new(zld: 16.0 / (365 * 24) / 4096) @@ -72,9 +72,13 @@ @wallet.sub(Tax::MAX_PAYMENT, best.invoice, pvt, details(best)) end def in_debt? debt > Tax::TRIAL + end + + def to_text + "A=#{@wallet.age}, F=#{Tax::FEE_TXN_HOUR}, T=#{@wallet.txns.count}" end def debt txns = @wallet.txns scored = txns.map do |t|