bin/bitcoinrbd in bitcoinrb-grpc-0.1.0 vs bin/bitcoinrbd in bitcoinrb-grpc-0.1.1
- old
+ new
@@ -15,17 +15,23 @@
require 'bitcoin/grpc'
require 'extensions/bitcoin/rpc/request_handler'
require 'extensions/bitcoin/wallet/base'
require 'extensions/bitcoin/tx'
+ refresh_wallet
node = Bitcoin::Node::SPV.new(conf)
Thread.new { Bitcoin::Grpc::Server.run(node) }
node.run
end
def stop(args)
puts "Bitcoinrb daemon stop : #{Time.now} #{args}"
end
+end
+
+def refresh_wallet
+ default_wallet = Bitcoin::Wallet::Base.current_wallet || Bitcoin::Wallet::Base.create(1)
+ default_wallet.close
end
class Bitcoinrbd < Thor
class_option :network, aliases: '-n', default: :mainnet