Skip to content

Commit

Permalink
refactor: cquery ell_otuput's lock script
Browse files Browse the repository at this point in the history
Signed-off-by: Miles Zhang <[email protected]>
  • Loading branch information
zmcNotafraid committed Feb 24, 2025
1 parent 17acb32 commit 00825a8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/workers/analyze_contract_from_cell_dependency_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,17 @@ def analyze_scripts(ckb_transaction)
cell_outputs = ckb_transaction.cell_outputs.includes(:type_script).to_a
cell_inputs = ckb_transaction.cell_inputs.includes(:previous_cell_output).map(&:previous_cell_output)

(cell_inputs + cell_outputs).each do |cell|
cell_inputs.each do |cell|

Check warning on line 51 in app/workers/analyze_contract_from_cell_dependency_worker.rb

View check run for this annotation

Codecov / codecov/patch

app/workers/analyze_contract_from_cell_dependency_worker.rb#L51

Added line #L51 was not covered by tests
lock_scripts[cell.lock_script.code_hash] = cell.lock_script.hash_type
if cell.type_script
type_scripts[cell.type_script.code_hash] = cell.type_script.hash_type
end
end
cell_outputs.each do |cell|
if cell.type_script
type_scripts[cell.type_script.code_hash] = cell.type_script.hash_type
end
end

Check warning on line 61 in app/workers/analyze_contract_from_cell_dependency_worker.rb

View check run for this annotation

Codecov / codecov/patch

app/workers/analyze_contract_from_cell_dependency_worker.rb#L57-L61

Added lines #L57 - L61 were not covered by tests

[lock_scripts, type_scripts]
end
Expand Down

0 comments on commit 00825a8

Please sign in to comment.