Skip to content

Commit

Permalink
chore: update bitcoin statistics log
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitz committed Dec 30, 2024
1 parent 51822bf commit cd83dac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/workers/generate_bitcoin_statistic_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def perform

BitcoinStatistic.upsert_all(statistic_attributes, unique_by: %i[timestamp network])
rescue StandardError => e
Rails.logger.error "Error occurred during GenerateRgbppHourlyStatistic error: #{e.message}"
Rails.logger.error "Error occurred during GenerateBitcoinStatisticWorker error: #{e.message}"
end

private
Expand Down Expand Up @@ -47,7 +47,7 @@ def ckb_attributes(start_time, end_time)

transactions_count = ft_transaction_ids.length + dob_transaction_ids.length
timestamp = end_time.utc.to_i * 1000
{ timestamp:, transactions_count:, network: :ckb }
{ timestamp:, addresses_count: 0, transactions_count:, network: :ckb }
end

def time_range
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class AddNetworkToBitcoinStatistics < ActiveRecord::Migration[7.0]
def change
add_column :bitcoin_statistics, :network, :integer, default: :btc
add_column :bitcoin_statistics, :network, :integer
remove_index :bitcoin_statistics, :timestamp
add_index :bitcoin_statistics, %i[timestamp network], unique: true
end
Expand Down

0 comments on commit cd83dac

Please sign in to comment.