Skip to content

Commit

Permalink
Merge pull request #1552 from nervosnetwork/testnet
Browse files Browse the repository at this point in the history
Deploy to mainnet
  • Loading branch information
rabbitz authored Jan 2, 2024
2 parents 5377096 + f8ed5e4 commit 9749704
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/ckb_sync/new_node_data_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ def build_cells_and_locks!(
if contract
temp_hash = temp_hash.merge is_contract: true, contract_id: contract.id
else
contract = Contract.create code_hash: lock_script.code_hash
contract = Contract.create code_hash: lock_script.script_hash
temp_hash = temp_hash.merge contract_id: contract.id
end
script = Script.find_or_create_by temp_hash
Expand All @@ -796,7 +796,7 @@ def build_cells_and_locks!(
type_script_ids.each do |type_script_id|
type_script = TypeScript.find(type_script_id)
temp_hash = { script_hash: type_script&.script_hash, is_contract: false }
contract = Contract.find_by code_hash: type_script.script_hash
contract = Contract.find_by code_hash: type_script.code_hash

if contract
temp_hash = temp_hash.merge is_contract: true, contract_id: contract.id
Expand Down

0 comments on commit 9749704

Please sign in to comment.