lib/bitcoin/wallet/coinselector.rb in bitcoin-ruby-0.0.1 vs lib/bitcoin/wallet/coinselector.rb in bitcoin-ruby-0.0.2

- old
+ new

@@ -1,5 +1,7 @@ +# encoding: ascii-8bit + module Bitcoin::Wallet # select unspent txouts to be used by the Wallet when creating a new transaction class SimpleCoinSelector @@ -12,9 +14,10 @@ def select(value) txouts = [] @txouts.each do |txout| begin next if txout.get_next_in + next if Bitcoin.namecoin? && txout.type.to_s =~ /^name_/ next unless txout.get_address next unless txout.get_tx.get_block txouts << txout return txouts if txouts.map(&:value).inject(:+) >= value rescue