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 +4 -4
- data/bin/bitcoinrbd +6 -0
- data/lib/bitcoin/grpc/version.rb +1 -1
- data/lib/extensions/bitcoin/wallet/base.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c5813a99abdb0d11df6377415fcd8b03552e43f69fda3dd9e1077715b43da59
|
4
|
+
data.tar.gz: 932e1332c062fb0d745370dfbf3c6fb2ce007fc0a7e1f156809b2d7ce9ea7db4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/bitcoin/grpc/version.rb
CHANGED
@@ -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.
|
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
|
+
date: 2018-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|