txcatcher 0.1.0 → 0.1.1
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/VERSION +1 -1
- data/lib/txcatcher/initializer.rb +17 -8
- data/txcatcher.gemspec +92 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 905429921e61c985113797cc22de587a84bef52a
|
|
4
|
+
data.tar.gz: 9d9ee7f15920b8d95b8a379931ee75cf3068e4d6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2cb6117d68704c5007ad9ca2ce3663352b156c782b7d0331e52a11c613f764a345e3677b962897951141fc8aa9116368e630382d9c0a693fa02c1076cc32c512
|
|
7
|
+
data.tar.gz: fca2fe045c48d8fa94d4a277bb7bdb3891d803dad52d7ba72279bd6767615ea546b58f631a54604562d1380fb3c9127f68523ebbecc878ed72379a37759ea9ca
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.1
|
|
@@ -121,15 +121,24 @@ module TxCatcher
|
|
|
121
121
|
def connect_to_rpc_node
|
|
122
122
|
n = TxCatcher::Config.rpcnode
|
|
123
123
|
print "Checking #{n["name"]} RPC connection... "
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
124
|
+
TxCatcher.rpc_node = BitcoinRPC.new("http://#{n["user"]}:#{n["password"]}@#{n["host"]}:#{n["port"]}")
|
|
125
|
+
|
|
126
|
+
i = 0 # try to connect to RPC 100 times before exiting with error
|
|
127
|
+
until TxCatcher.current_block_height
|
|
128
|
+
begin
|
|
129
|
+
TxCatcher.current_block_height = TxCatcher.rpc_node.getblockcount
|
|
130
|
+
rescue Errno::ECONNREFUSED, BitcoinRPC::JSONRPCError => e
|
|
131
|
+
if i > 100
|
|
132
|
+
print "ERROR, cannot connect using connection data #{n["name"]}\n"
|
|
133
|
+
exit
|
|
134
|
+
else
|
|
135
|
+
print "Bitcoin RPC connection error: #{e.to_s}; will try again in 1 sec...\n"
|
|
136
|
+
i += 1
|
|
137
|
+
sleep 1
|
|
138
|
+
end
|
|
139
|
+
end
|
|
132
140
|
end
|
|
141
|
+
print "current block height: #{TxCatcher.current_block_height}\n"
|
|
133
142
|
end
|
|
134
143
|
|
|
135
144
|
def run_migrations
|
data/txcatcher.gemspec
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Generated by jeweler
|
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
|
+
# -*- encoding: utf-8 -*-
|
|
5
|
+
# stub: txcatcher 0.1.1 ruby lib
|
|
6
|
+
|
|
7
|
+
Gem::Specification.new do |s|
|
|
8
|
+
s.name = "txcatcher"
|
|
9
|
+
s.version = "0.1.1"
|
|
10
|
+
|
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
12
|
+
s.require_paths = ["lib"]
|
|
13
|
+
s.authors = ["Roman Snitko"]
|
|
14
|
+
s.date = "2017-09-23"
|
|
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."
|
|
16
|
+
s.email = "roman.snitko@gmail.com"
|
|
17
|
+
s.executables = ["txcatcher"]
|
|
18
|
+
s.extra_rdoc_files = [
|
|
19
|
+
"LICENSE.txt",
|
|
20
|
+
"README.md"
|
|
21
|
+
]
|
|
22
|
+
s.files = [
|
|
23
|
+
".document",
|
|
24
|
+
".rspec",
|
|
25
|
+
"Gemfile",
|
|
26
|
+
"Gemfile.lock",
|
|
27
|
+
"LICENSE.txt",
|
|
28
|
+
"README.md",
|
|
29
|
+
"Rakefile",
|
|
30
|
+
"VERSION",
|
|
31
|
+
"bin/txcatcher",
|
|
32
|
+
"db/migrations/001_create_transactions.rb",
|
|
33
|
+
"db/migrations/002_create_addresses.rb",
|
|
34
|
+
"db/migrations/003_create_deposits.rb",
|
|
35
|
+
"db/schema.rb",
|
|
36
|
+
"lib/tasks/db.rake",
|
|
37
|
+
"lib/txcatcher.rb",
|
|
38
|
+
"lib/txcatcher/bitcoin_rpc.rb",
|
|
39
|
+
"lib/txcatcher/catcher.rb",
|
|
40
|
+
"lib/txcatcher/cleaner.rb",
|
|
41
|
+
"lib/txcatcher/config.rb",
|
|
42
|
+
"lib/txcatcher/initializer.rb",
|
|
43
|
+
"lib/txcatcher/models/address.rb",
|
|
44
|
+
"lib/txcatcher/models/deposit.rb",
|
|
45
|
+
"lib/txcatcher/models/transaction.rb",
|
|
46
|
+
"lib/txcatcher/server.rb",
|
|
47
|
+
"lib/txcatcher/utils/hash_string_to_sym_keys.rb",
|
|
48
|
+
"spec/catcher_spec.rb",
|
|
49
|
+
"spec/cleaner_spec.rb",
|
|
50
|
+
"spec/config/config.yml",
|
|
51
|
+
"spec/config/txcatcher_test.db",
|
|
52
|
+
"spec/fixtures/transaction.txt",
|
|
53
|
+
"spec/fixtures/transaction_decoded_no_outputs.txt",
|
|
54
|
+
"spec/models/address_spec.rb",
|
|
55
|
+
"spec/models/transaction_spec.rb",
|
|
56
|
+
"spec/spec_helper.rb",
|
|
57
|
+
"templates/config.yml",
|
|
58
|
+
"txcatcher.gemspec"
|
|
59
|
+
]
|
|
60
|
+
s.homepage = "http://github.com/snitko/txcatcher"
|
|
61
|
+
s.licenses = ["MIT"]
|
|
62
|
+
s.rubygems_version = "2.5.1"
|
|
63
|
+
s.summary = "An lightweight version of Bitpay's Insight, allows to check Bitcoin/Litecoin addresses"
|
|
64
|
+
|
|
65
|
+
if s.respond_to? :specification_version then
|
|
66
|
+
s.specification_version = 4
|
|
67
|
+
|
|
68
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
69
|
+
s.add_runtime_dependency(%q<goliath>, [">= 0"])
|
|
70
|
+
s.add_runtime_dependency(%q<sequel>, [">= 0"])
|
|
71
|
+
s.add_runtime_dependency(%q<ffi-rzmq>, [">= 0"])
|
|
72
|
+
s.add_runtime_dependency(%q<satoshi-unit>, [">= 0"])
|
|
73
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
|
74
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
|
75
|
+
else
|
|
76
|
+
s.add_dependency(%q<goliath>, [">= 0"])
|
|
77
|
+
s.add_dependency(%q<sequel>, [">= 0"])
|
|
78
|
+
s.add_dependency(%q<ffi-rzmq>, [">= 0"])
|
|
79
|
+
s.add_dependency(%q<satoshi-unit>, [">= 0"])
|
|
80
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
|
81
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
|
82
|
+
end
|
|
83
|
+
else
|
|
84
|
+
s.add_dependency(%q<goliath>, [">= 0"])
|
|
85
|
+
s.add_dependency(%q<sequel>, [">= 0"])
|
|
86
|
+
s.add_dependency(%q<ffi-rzmq>, [">= 0"])
|
|
87
|
+
s.add_dependency(%q<satoshi-unit>, [">= 0"])
|
|
88
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
|
89
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: txcatcher
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Roman Snitko
|
|
@@ -139,6 +139,7 @@ files:
|
|
|
139
139
|
- spec/models/transaction_spec.rb
|
|
140
140
|
- spec/spec_helper.rb
|
|
141
141
|
- templates/config.yml
|
|
142
|
+
- txcatcher.gemspec
|
|
142
143
|
homepage: http://github.com/snitko/txcatcher
|
|
143
144
|
licenses:
|
|
144
145
|
- MIT
|