sibit 0.18.5 → 0.18.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sibit/btc.rb +3 -1
- data/lib/sibit/version.rb +1 -1
- 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: ecbcb8af739829048716cc6a4982194b5789a387cc8bf43bff7c04aea56e3837
|
4
|
+
data.tar.gz: 50b3b2d711f8fa716dc0eb1f87f398d66dc7156256342b8bfe26893bf6447f35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf27929a0f51bee419d1b50c5bff9b378e8505503f4e872b5d842c9c1abdeaf6bcc9f4538b3755b7a7d4baacf15782f0571adddc2857b119d5bacbbc95839db8
|
7
|
+
data.tar.gz: 2761fa763d4800979cf5b0df30c90b62f5f879992e01f46dd9746f92651dc65497caaea54db3608bedcf38d602195fc3576a626567fc7ca886545a5482fbbf05
|
data/lib/sibit/btc.rb
CHANGED
@@ -69,7 +69,9 @@ class Sibit
|
|
69
69
|
head = Sibit::Json.new(http: @http, log: @log).get(
|
70
70
|
URI("https://chain.api.btc.com/v3/block/#{hash}")
|
71
71
|
)
|
72
|
-
|
72
|
+
data = head['data']
|
73
|
+
raise Sibit::Error, "The block #{hash} not found" if data.nil?
|
74
|
+
nxt = data['next_block_hash']
|
73
75
|
nxt = nil if nxt == '0000000000000000000000000000000000000000000000000000000000000000'
|
74
76
|
@log.info("The block #{hash} is the latest, there is no next block") if nxt.nil?
|
75
77
|
@log.info("The next block of #{hash} is #{nxt}") unless nxt.nil?
|
data/lib/sibit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sibit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|