Skip to content

Commit

Permalink
chore: add parse deps log
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitz committed Nov 16, 2023
1 parent d86b171 commit df9d26e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/cell_output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ def self.find_by_pointer(tx_hash, index)
race_condition_ttl: 10.seconds,
expires_in: 1.day) do
tx_id = CkbTransaction.find_by_tx_hash(tx_hash)&.id

Rails.logger.info("find_by_pointer: tx_hash: #{tx_hash}, index: #{index}, tx_id: #{tx_id}")
find_by(ckb_transaction_id: tx_id, cell_index: index.is_a?(String) ? index.hex : index) if tx_id
end
end
Expand Down
1 change: 1 addition & 0 deletions app/models/deployed_cell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def self.create_initial_data_for_ckb_transaction(ckb_transaction, cell_deps)
parse_code_dep =
->(cell_dep) do
# this cell output is the contract cell, i.e. one of deployed cells of the contract
Rails.logger.info("parse_code_dep cell_dep: #{cell_dep}")
cell_output = CellOutput.find_by_pointer cell_dep["out_point"]["tx_hash"], cell_dep["out_point"]["index"]

attr = {
Expand Down

0 comments on commit df9d26e

Please sign in to comment.