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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f85d6af8efe3b90b84fd7a5756ebda0c31ed50da36cc9a264424a531c8a8b10
4
- data.tar.gz: 8008c7deb9d9981a7a0fc8b959effb2eb4d77b4fd58080e9a0e7a8b2df9476bd
3
+ metadata.gz: ecbcb8af739829048716cc6a4982194b5789a387cc8bf43bff7c04aea56e3837
4
+ data.tar.gz: 50b3b2d711f8fa716dc0eb1f87f398d66dc7156256342b8bfe26893bf6447f35
5
5
  SHA512:
6
- metadata.gz: ea92cf18899819136b9ff0f4a7e8a1fae200a70633e79e9dcfdb01006c42518757577f0105f3b7e78604275b0a38cf23ee37a2f5758c2caddb6add807032305d
7
- data.tar.gz: 7e2cfe391ea6862616eb475c09ca5a7fb86cc92d95c1366dc56c4d32dba4d3d8fa1d6974d36b0e52ed1eee60658ff82d0fca0ccf56042ed4ce3dcb31781025b9
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
- nxt = head['data']['next_block_hash']
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
@@ -26,5 +26,5 @@
26
26
  # License:: MIT
27
27
  class Sibit
28
28
  # Current version of the library.
29
- VERSION = '0.18.5'
29
+ VERSION = '0.18.6'
30
30
  end
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.5
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-03-29 00:00:00.000000000 Z
11
+ date: 2020-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace