Skip to content

Commit

Permalink
Merge pull request #1909 from nervosnetwork/testnet
Browse files Browse the repository at this point in the history
Deploy to mainnet
  • Loading branch information
zmcNotafraid authored Jun 3, 2024
2 parents e6ed219 + 3584daf commit 34b43d9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/jobs/csv_exportable/export_dao_depositors_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def perform(args)
end

if args[:end_date].present?
sql << " AND ckb_transactions.block_timestamp <= #{BigDecimal(args[:start_date])}"
sql << " AND ckb_transactions.block_timestamp <= #{BigDecimal(args[:end_date])}"
end

if args[:start_number].present?
Expand Down
24 changes: 13 additions & 11 deletions app/models/daily_statistic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -383,17 +383,19 @@ def liquidity
to_be_counted_date.days_ago(1).to_i * 1000, to_be_counted_date.to_i * 1000 - 1
).consumed_after(to_be_counted_date.to_i * 1000).sum(:capacity)

{
over_three_years:,
one_year_to_three_years:,
six_months_to_one_year:,
three_months_to_six_months:,
one_month_to_three_months:,
one_week_to_one_month:,
day_to_one_week:,
latest_day:,
total_supply: total_supply + burnt,
}.transform_values { |value| (value.to_f / 10**8).truncate(8) }
base_attrs =
{
over_three_years:,
one_year_to_three_years:,
six_months_to_one_year:,
three_months_to_six_months:,
one_month_to_three_months:,
one_week_to_one_month:,
day_to_one_week:,
latest_day:,
}
total_live_capacities = base_attrs.values.sum
base_attrs.merge(total_supply: total_live_capacities).transform_values { |value| (value.to_f / 10**8).truncate(8) }
end

private
Expand Down
4 changes: 2 additions & 2 deletions app/workers/bitcoin_transaction_detect_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ def annotation_workflow_attributes(transaction)
end
}

input_lock_types = transaction.input_cells.map { _1.bitcoin_transfer&.lock_type }.uniq
input_lock_types = transaction.input_cells.where.not(type_script_id: nil).map { _1.bitcoin_transfer&.lock_type }.uniq
sort_types.call(input_lock_types)

output_lock_types = transaction.cell_outputs.map { _1.bitcoin_transfer&.lock_type }.uniq
output_lock_types = transaction.cell_outputs.where.not(type_script_id: nil).map { _1.bitcoin_transfer&.lock_type }.uniq
sort_types.call(output_lock_types)

if input_lock_types == ["rgbpp"]
Expand Down

0 comments on commit 34b43d9

Please sign in to comment.