cryptum 0.0.334 → 0.0.335

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: 32f1395f2dc8feb6e063a54ea5cbe28c589bcc8f394cff18d549daa01abb6562
4
- data.tar.gz: 9ad9843eb6a6867317556e0b5b77c431ca85b393abcc7208bd3c559d6b43669a
3
+ metadata.gz: 2e7aaa092e4bed9f901e33220f92b8c265967a232d65c10f7552fb568724bbdc
4
+ data.tar.gz: 52cb04ca782b3ff1fd86093b63542ba2a08f3e49faa048f07b4e91bdb08b6095
5
5
  SHA512:
6
- metadata.gz: 6b96f8014e1ff6088a518a3e9bd6840335a0181c7664c7c9cba29e2ceb9e91c61c54ad0c4905f20668d8527dd31348809156efb6202199a5d56bce59f4b4fd81
7
- data.tar.gz: 4372cf33d301727ea059511f846e189c899c5fc88aa81d5312e36ff7ba35bff96f8dcc70ae810a831183345f8c9289efe9fe930e792a72f5e7e68bb43cf168d1
6
+ metadata.gz: 528dc2029f683179d4b355472fc23be687d63fef3cdd87d6203f307b5baf1643d2721d24956474f20ff6826d8e779d54419139e4696db2e5e538da0d347f700a
7
+ data.tar.gz: 48d45e80779b3f436ce285e1fdabd458ae6f57bc5d3e2da585a46b0df134002a8dd52472835e9af08e24fbf92ec4d1d46228512ed117da5640fcc82340bdf3b5
@@ -28,10 +28,21 @@ module Cryptum
28
28
 
29
29
  sequence = event[:sequence].to_i
30
30
  last_sequence = order_book[:sequence].to_i
31
+ order_book[:sequence] = sequence
31
32
 
32
- raise "ERROR: Sequence Order Mismatch - #{last_sequence} #{sequence}" unless sequence >= last_sequence
33
+ return unless sequence >= last_sequence
34
+
35
+ if last_sequence + 1 < sequence
36
+ sequence_diff = sequence - last_sequence
37
+ f.puts Time.now.strftime('%Y-%m-%d %H:%M:%S.%N %z')
38
+ f.puts "Module: #{self}"
39
+ f.puts 'Messages likely dropped:'
40
+ f.puts "This Sequence: #{sequence}"
41
+ f.puts "Last Sequence: #{last_sequence}"
42
+ f.puts "Sequence Diff: #{sequence_diff}\n\n\n"
43
+ end
44
+ # raise "ERROR: Sequence Order Mismatch - #{last_sequence} #{sequence}" unless sequence >= last_sequence
33
45
 
34
- order_book[:sequence] = sequence
35
46
  open_24h = event[:open_24h].to_f
36
47
  order_book[:open_24h] = open_24h
37
48
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.334'
4
+ VERSION = '0.0.335'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.334
4
+ version: 0.0.335
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.