sibit 0.21.1 → 0.21.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sibit/blockchain.rb +12 -11
- data/lib/sibit/version.rb +1 -1
- data/test/test_blockchain.rb +1 -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: 593c0f45e8be8a5469ad09ec98484016660f50b0ea96d7759c7f0b4b26888846
|
4
|
+
data.tar.gz: 4ff151ef6106f75130eff546a28f2559c0e6b6e2cc2d292db7283b318769d3f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2de6950c08eb3fccc207c46ee71220cac5cefffc942df930b607ac8db0d789b077877cb69444c7a7bfc8696b2704ec5d38af47d346f7b814d235cbcf199873f6
|
7
|
+
data.tar.gz: 8ea109679ddb4d0374ef766faacfc7bae6ed0d31f11b9f50e764493d896b03a7351169e80dfe0924479c5f30c03a9e91d04ad463a90d75e73fabc8558f94f0a1
|
data/lib/sibit/blockchain.rb
CHANGED
@@ -58,17 +58,18 @@ class Sibit
|
|
58
58
|
end
|
59
59
|
|
60
60
|
# Get hash of the block after this one.
|
61
|
-
def next_of(
|
62
|
-
|
63
|
-
|
64
|
-
)
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
61
|
+
def next_of(_hash)
|
62
|
+
raise Sibit::NotSupportedError, 'next_of() in Blockchain API is broken, always returns NULL'
|
63
|
+
# json = Sibit::Json.new(http: @http, log: @log).get(
|
64
|
+
# URI("https://blockchain.info/rawblock/#{hash}")
|
65
|
+
# )
|
66
|
+
# nxt = json['next_block'][0]
|
67
|
+
# if nxt.nil?
|
68
|
+
# @log.info("There is no block after #{hash}")
|
69
|
+
# else
|
70
|
+
# @log.info("The next block of #{hash} is #{nxt}")
|
71
|
+
# end
|
72
|
+
# nxt
|
72
73
|
end
|
73
74
|
|
74
75
|
# The height of the block.
|
data/lib/sibit/version.rb
CHANGED
data/test/test_blockchain.rb
CHANGED
@@ -47,6 +47,7 @@ class TestBlockchain < Minitest::Test
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def test_next_of
|
50
|
+
skip
|
50
51
|
hash = '0000000000000000000f676241aabc9b62b748d26192a44bc25720c34de27d19'
|
51
52
|
stub_request(:get, "https://blockchain.info/rawblock/#{hash}")
|
52
53
|
.to_return(body: '{"next_block": ["nxt"]}')
|
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.21.
|
4
|
+
version: 0.21.2
|
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-09-
|
11
|
+
date: 2020-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|