sibit 0.21.5 → 0.21.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sibit.rb +7 -2
- data/lib/sibit/bitcoinchain.rb +1 -0
- data/lib/sibit/blockchain.rb +1 -0
- data/lib/sibit/btc.rb +2 -1
- data/lib/sibit/cryptoapis.rb +1 -0
- data/lib/sibit/fake.rb +1 -0
- 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: 5fedd8437c2839f08b7848a6451cadf574a59cb8fa4ea4ef98440612f031d240
|
|
4
|
+
data.tar.gz: b847db96a5b91a8b8c361d52d554573b6c1aea0ab340df3b410731bc7d7ed4a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 354a33e9fd0e1fb0360f4f0e80f29f1aa60de51e0dfa25ae8d6434a2547570fa814645c26b66f6c572b0e50ada6fa0121086fe328a5351a8b6fc70445d4705d5
|
|
7
|
+
data.tar.gz: ae351875b79a6ea30c026ac788780b3c15efd390ec67f4fc6ff9481b248d18671d813ce62687c0832bea0144416e55bd93973e4ab77b1c2f29dc389098f04486
|
data/lib/sibit.rb
CHANGED
|
@@ -221,10 +221,15 @@ class Sibit
|
|
|
221
221
|
checked += 1
|
|
222
222
|
end
|
|
223
223
|
count += 1
|
|
224
|
-
@log.info("We checked #{checked} txns and #{checked_outputs} outputs
|
|
224
|
+
@log.info("We checked #{checked} txns and #{checked_outputs} outputs
|
|
225
|
+
in block #{block} (by #{json[:provider]})")
|
|
225
226
|
block = json[:next]
|
|
226
227
|
if block.nil?
|
|
227
|
-
@log.info("The next_block is empty in
|
|
228
|
+
@log.info("The next_block is empty in #{json[:hash]}, this may be the end of Blockchain...")
|
|
229
|
+
block = @api.next_of(json[:hash])
|
|
230
|
+
end
|
|
231
|
+
if block.nil?
|
|
232
|
+
@log.info("The block #{json[:hash]} is definitely the end of Blockchain, we stop.")
|
|
228
233
|
break
|
|
229
234
|
end
|
|
230
235
|
if count > max
|
data/lib/sibit/bitcoinchain.rb
CHANGED
data/lib/sibit/blockchain.rb
CHANGED
data/lib/sibit/btc.rb
CHANGED
|
@@ -74,7 +74,7 @@ class Sibit
|
|
|
74
74
|
balance
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
-
# Get hash of the block after this one.
|
|
77
|
+
# Get hash of the block after this one, or NIL if it's the last one in Blockchain.
|
|
78
78
|
def next_of(hash)
|
|
79
79
|
head = Sibit::Json.new(http: @http, log: @log).get(
|
|
80
80
|
Iri.new('https://chain.api.btc.com/v3/block').append(hash)
|
|
@@ -162,6 +162,7 @@ class Sibit
|
|
|
162
162
|
nxt = data['next_block_hash']
|
|
163
163
|
nxt = nil if nxt == '0000000000000000000000000000000000000000000000000000000000000000'
|
|
164
164
|
{
|
|
165
|
+
provider: self.class.name,
|
|
165
166
|
hash: data['hash'],
|
|
166
167
|
orphan: data['is_orphan'],
|
|
167
168
|
next: nxt,
|
data/lib/sibit/cryptoapis.rb
CHANGED
data/lib/sibit/fake.rb
CHANGED
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.21.
|
|
4
|
+
version: 0.21.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: 2021-02-
|
|
11
|
+
date: 2021-02-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: backtrace
|