txcatcher 0.1.75 → 0.1.76

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
  SHA1:
3
- metadata.gz: 9b7dc3ae4c6fd912e914dd8f96cfd7dee17070d6
4
- data.tar.gz: 698dfaee6449d7d24a19f72ce59de0fb472f8a27
3
+ metadata.gz: 95e2800adb929dc5f1e9ae34f0e1b34ba21481c3
4
+ data.tar.gz: 795a2008f84c2b8903462b20f45156b3f2179993
5
5
  SHA512:
6
- metadata.gz: a0e8283e22af52664c2a6b9ae46f77f4447d6cd2a322dc54fe28a2cb9f542419381270b8dc6c7f239abbde81dd5e6d1de6ee683df6d7a4214c9d3043c41f8373
7
- data.tar.gz: 20029f87d61dab8a0443441986606f624483216ce03624158685d1226c6e7bcd56433a76abf4c71d5b9967b07909d744c3944cf5bf6bf638e04e13877ba36921
6
+ metadata.gz: 420026a98d183e4015a70cb988a7913147ca52c8b8d984f3e475466ca33b7eb114260d8d33fff93ea75f5544ab6683ee3710423dafbf54f0e9df5ae9aefe0ddd
7
+ data.tar.gz: b5c0f92e0ceb8903a8fc638e55cf66d482bf8a571db9c01a0916f38abc4a3dfdaacfb83dbe9beb415b2f60294541cb156a1a02dd35bc50740f2c9916de20d879
data/Gemfile.lock CHANGED
@@ -17,7 +17,7 @@ GEM
17
17
  eventmachine (1.2.5)
18
18
  faraday (0.9.2)
19
19
  multipart-post (>= 1.2, < 3)
20
- ffi (1.9.18)
20
+ ffi (1.9.21)
21
21
  ffi-rzmq (2.0.5)
22
22
  ffi-rzmq-core (>= 1.0.6)
23
23
  ffi-rzmq-core (1.0.6)
@@ -45,14 +45,14 @@ GEM
45
45
  hashie (3.5.7)
46
46
  highline (1.7.10)
47
47
  http_parser.rb (0.6.0)
48
- jeweler (2.3.7)
48
+ jeweler (2.3.9)
49
49
  builder
50
- bundler (>= 1)
50
+ bundler
51
51
  git (>= 1.2.5)
52
52
  github_api (~> 0.16.0)
53
53
  highline (>= 1.6.15)
54
54
  nokogiri (>= 1.5.10)
55
- psych (~> 2.2)
55
+ psych
56
56
  rake
57
57
  rdoc
58
58
  semver2
@@ -63,7 +63,7 @@ GEM
63
63
  multi_json (1.13.1)
64
64
  multi_xml (0.6.0)
65
65
  multipart-post (2.0.0)
66
- nokogiri (1.8.1)
66
+ nokogiri (1.8.2)
67
67
  mini_portile2 (~> 2.3.0)
68
68
  oauth2 (1.4.0)
69
69
  faraday (>= 0.8, < 0.13)
@@ -71,7 +71,7 @@ GEM
71
71
  multi_json (~> 1.3)
72
72
  multi_xml (~> 0.5)
73
73
  rack (>= 1.2, < 3)
74
- psych (2.2.4)
74
+ psych (3.0.2)
75
75
  rack (1.6.8)
76
76
  rack-accept-media-types (0.9)
77
77
  rack-contrib (1.8.0)
@@ -92,10 +92,10 @@ GEM
92
92
  rspec-mocks (3.7.0)
93
93
  diff-lcs (>= 1.2.0, < 2.0)
94
94
  rspec-support (~> 3.7.0)
95
- rspec-support (3.7.0)
95
+ rspec-support (3.7.1)
96
96
  satoshi-unit (0.2.2)
97
97
  semver2 (3.4.2)
98
- sequel (5.4.0)
98
+ sequel (5.5.0)
99
99
  sqlite3 (1.3.13)
100
100
  thread_safe (0.3.6)
101
101
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.75
1
+ 0.1.76
@@ -1,7 +1,7 @@
1
1
  Sequel.migration do
2
2
  change do
3
3
  create_table(:transactions) do
4
- primary_key :id
4
+ primary_key :id, type: :Bignum
5
5
  String :txid, index: true
6
6
  String :hex, text: true
7
7
  Integer :amount
@@ -1,7 +1,7 @@
1
1
  Sequel.migration do
2
2
  change do
3
3
  create_table(:addresses) do
4
- primary_key :id
4
+ primary_key :id, type: :Bignum
5
5
  String :address, index: true
6
6
  Integer :received, default: 0
7
7
  end
@@ -1,7 +1,7 @@
1
1
  Sequel.migration do
2
2
  change do
3
3
  create_table(:deposits) do
4
- primary_key :id
4
+ primary_key :id, type: :Bignum
5
5
  Integer :amount, null: false
6
6
  foreign_key :transaction_id, index: true
7
7
  foreign_key :address_id, index: true
@@ -52,11 +52,15 @@ module TxCatcher
52
52
  def clean_transactions(n)
53
53
  transactions = Transaction.order("created_at ASC")
54
54
  transactions.where(Sequel.~(protected: true)) if Config.protected_transactions
55
- transactions.limit(n).each do |t|
56
- $stdout.puts "- Removing tx #{t.txid}"
57
- clean_deposits(t)
58
- TxCatcher.db_connection[:transactions].filter(id: t.id).delete
59
- @@cleaning_counter[:transactions] += 1
55
+
56
+ (n/100).times do
57
+ limit = n <= 100 ? n : 100
58
+ transactions.limit(limit).each do |t|
59
+ $stdout.puts "- Removing tx #{t.txid}"
60
+ clean_deposits(t)
61
+ TxCatcher.db_connection[:transactions].filter(id: t.id).delete
62
+ @@cleaning_counter[:transactions] += 1
63
+ end
60
64
  end
61
65
  end
62
66
 
data/txcatcher.gemspec CHANGED
@@ -2,11 +2,11 @@
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.1.75 ruby lib
5
+ # stub: txcatcher 0.1.76 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "txcatcher"
9
- s.version = "0.1.75"
9
+ s.version = "0.1.76"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
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.75
4
+ version: 0.1.76
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Snitko