txcatcher 0.2.1 → 0.2.2

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: 03fd017ec924c7a85a4264985e2b1d7ba6cc39e274266a794038d986f3eb171f
4
- data.tar.gz: a4f85307010ffa7a411b87336e32e3fc5b2feec44c5a44ad66e0afc749717901
3
+ metadata.gz: 409a5a403f8319181f1cd59e48ea047c1dd21969521cdac7f5ca4720055ad2d3
4
+ data.tar.gz: e930dce76dcbd0d55900b4ac03c5d5038bd3fc3acddf382ca80326c0af428353
5
5
  SHA512:
6
- metadata.gz: 5865cf78068818916979e03568b0e19e98e0a1c8adbb097751b50d08d64a69ebc143e23eaf69ea389a5062ed968b74d394bd9243d3054d3ec7f4df752623695b
7
- data.tar.gz: e6c0a5379cce62e589bf11bfbc1999f02842057e4d224b6d858595466f31c0f875d3a017e1f7b66f3fd53ec61c3ddd4fe46199713256354fb10407fd52e80fcf
6
+ metadata.gz: 230257b520d4cd70b32cda25abb86a25312d22ef853f3fb36f7497fb63ef3b02101ebab3b24be0a7046258b27704c7e436db234a4d9b167127eb14b038c0994c
7
+ data.tar.gz: dca18424e36eb7b166ad8331a0c0c5444edc713cef9dcf287b84b0a160eec7efa06d6177ae25f0743919b3c027db05b8713d38c55bf1cb9d554b05b010688efb
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -9,12 +9,10 @@ module TxCatcher
9
9
  begin
10
10
  return route_for(uri)
11
11
  rescue BitcoinRPC::JSONRPCError => e
12
- puts e.to_s
13
- puts e.backtrace.join("\n")
12
+ LOGGER.report e.to_s + "\n" + e.backtrace.join("\n")
14
13
  return [400, {}, { error: e.data }.to_json]
15
14
  rescue Exception => e
16
- puts e.to_s
17
- puts e.backtrace.join("\n")
15
+ LOGGER.report e.to_s + "\n" + e.backtrace.join("\n")
18
16
  return [500, {}, { error: e.to_s }.to_json]
19
17
  end
20
18
  end
@@ -88,17 +86,19 @@ module TxCatcher
88
86
  outs
89
87
  end.flatten
90
88
 
91
- blocks = TxCatcher.rpc_node.get_blocks(unconfirmed_txs_to_update.first.blocks_to_check_for_inclusion_if_unconfirmed)
92
-
93
- unconfirmed_txs_to_update = unconfirmed_txs_to_update.map do |t|
94
- tx_block_height = t.update_block_height!(dont_save: true, blocks: blocks)
95
- if tx_block_height && tx_block_height > 0
96
- newly_confirmed_txs_to_update << t
97
- nil
98
- else
99
- t
100
- end
101
- end.compact
89
+ unless unconfirmed_txs_to_update.empty?
90
+ blocks = TxCatcher.rpc_node.get_blocks(unconfirmed_txs_to_update.first.blocks_to_check_for_inclusion_if_unconfirmed)
91
+
92
+ unconfirmed_txs_to_update = unconfirmed_txs_to_update.map do |t|
93
+ tx_block_height = t.update_block_height!(dont_save: true, blocks: blocks)
94
+ if tx_block_height && tx_block_height > 0
95
+ newly_confirmed_txs_to_update << t
96
+ nil
97
+ else
98
+ t
99
+ end
100
+ end.compact
101
+ end
102
102
 
103
103
  # Update all txs after we map them. We don't use regular Transaction#update
104
104
  # in the #map loop above, because this will quickly get out of hand and result
data/txcatcher.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: txcatcher 0.2.1 ruby lib
5
+ # stub: txcatcher 0.2.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "txcatcher".freeze
9
- s.version = "0.2.1"
9
+ s.version = "0.2.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Roman Snitko".freeze]
14
- s.date = "2018-09-28"
14
+ s.date = "2018-10-02"
15
15
  s.description = "Ccurrently, the only job of this gem is to collect all new Bitcoin/Litecoin transactions, store them in a DB, index addresses.".freeze
16
16
  s.email = "roman.snitko@gmail.com".freeze
17
17
  s.executables = ["txcatcher".freeze, "txcatcher-monitor".freeze]
@@ -64,7 +64,7 @@ Gem::Specification.new do |s|
64
64
  ]
65
65
  s.homepage = "http://github.com/snitko/txcatcher".freeze
66
66
  s.licenses = ["MIT".freeze]
67
- s.rubygems_version = "2.7.7".freeze
67
+ s.rubygems_version = "2.7.6".freeze
68
68
  s.summary = "An lightweight version of Bitpay's Insight, allows to check Bitcoin/Litecoin addresses".freeze
69
69
 
70
70
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: txcatcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Snitko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-28 00:00:00.000000000 Z
11
+ date: 2018-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: goliath
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
208
208
  version: '0'
209
209
  requirements: []
210
210
  rubyforge_project:
211
- rubygems_version: 2.7.7
211
+ rubygems_version: 2.7.6
212
212
  signing_key:
213
213
  specification_version: 4
214
214
  summary: An lightweight version of Bitpay's Insight, allows to check Bitcoin/Litecoin