bitcoinrb-grpc 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c892a34f49745c28f301ca246f810b408047612c795e55544b52bc0e3ad6959
4
- data.tar.gz: fa59b4f233f20002011dbf51ddee37d785098fda34b217624986376be80c7a0c
3
+ metadata.gz: 0c5813a99abdb0d11df6377415fcd8b03552e43f69fda3dd9e1077715b43da59
4
+ data.tar.gz: 932e1332c062fb0d745370dfbf3c6fb2ce007fc0a7e1f156809b2d7ce9ea7db4
5
5
  SHA512:
6
- metadata.gz: 1490e11ae29593cbf7de6818f32ab0e8b26104e9e552313d89e885161d84dbfa8d8749feccc859af8f6ff121b2a55b6fdd25d2a7215e7eded4dba743fee50537
7
- data.tar.gz: ee3cddb22076018d1f48f204a7b5c63001a235b99e2171084a7c39e36332f381c1ed02987ea39ba63b17830172189edbf51683ae14d67d929e31e65a97aded06
6
+ metadata.gz: 52882682f3c2b8197696663136ce5b921d1f65fb927c3879105975eee1ea5cbf318450e2f2bc66a416e00f97fdd723813eb224826fbf879ddc72bf417ee9b77c
7
+ data.tar.gz: 5fccb746675d7c0fd58f069969aa11165a395411c04b9e76c5511cd2ff43c9fcae100f5f67ed17a39ad14db5c670bded100bff0d3bdc13e65ed28a10a28e53a5
data/bin/bitcoinrbd CHANGED
@@ -17,6 +17,7 @@ class BitcoinDaemon < DaemonSpawn::Base
17
17
  require 'extensions/bitcoin/wallet/base'
18
18
  require 'extensions/bitcoin/tx'
19
19
 
20
+ refresh_wallet
20
21
  node = Bitcoin::Node::SPV.new(conf)
21
22
  Thread.new { Bitcoin::Grpc::Server.run(node) }
22
23
  node.run
@@ -27,6 +28,11 @@ class BitcoinDaemon < DaemonSpawn::Base
27
28
  end
28
29
  end
29
30
 
31
+ def refresh_wallet
32
+ default_wallet = Bitcoin::Wallet::Base.current_wallet || Bitcoin::Wallet::Base.create(1)
33
+ default_wallet.close
34
+ end
35
+
30
36
  class Bitcoinrbd < Thor
31
37
 
32
38
  class_option :network, aliases: '-n', default: :mainnet
@@ -1,5 +1,5 @@
1
1
  module Bitcoin
2
2
  module Grpc
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -37,6 +37,11 @@ module Bitcoin
37
37
  utxo_db.list_unspent_assets_in_account(asset_type, asset_id, account, current_block_height: current_block_height, min: min, max: max)
38
38
  end
39
39
 
40
+ def close
41
+ db.close
42
+ utxo_db.close
43
+ end
44
+
40
45
  private
41
46
 
42
47
  def initialize(wallet_id, path_prefix)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitcoinrb-grpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hajime Yamaguchi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-11 00:00:00.000000000 Z
11
+ date: 2018-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler