Commit f3b4147130f12ca864d9760939d2126c61f6d843

Authored by Marius Hanne
Committed by Julian Langschaedel
1 parent bd65c3e22c

wallet: fix config option parsing

Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff

... ... @@ -69,7 +69,7 @@
69 69  
70 70 cmd = ARGV.shift; cmdopts = ARGV
71 71 unless cmd
72   - exit puts optparse
  72 + puts optparse; exit
73 73 end
74 74  
75 75 Bitcoin.network = options[:network]
... ... @@ -143,7 +143,7 @@
143 143 end
144 144 end
145 145 EM.run do
146   - Bitcoin::Network::CommandClient.connect(*options[:command].split(":")) do
  146 + Bitcoin::Network::CommandClient.connect(*options[:command]) do
147 147 on_connected do
148 148 request(:relay_tx, tx.to_payload.hth)
149 149 end
... ... @@ -385,7 +385,7 @@
385 385 end
386 386  
387 387 EM.run do
388   - EM.connect(*options[:command].split(":")) do |conn|
  388 + EM.connect(*options[:command]) do |conn|
389 389 conn.send_data(["relay_tx", tx.to_payload.unpack("H*")[0]].to_json)
390 390 def conn.receive_data(data)
391 391 (@buf ||= BufferedTokenizer.new("\x00")).extract(data).each do |packet|
... ... @@ -398,6 +398,6 @@
398 398 end
399 399  
400 400 else
401   - puts "Unknown command."
  401 + puts "Unknown command. See --help for available commands."
402 402 end