Skip to content

Commit

Permalink
Merge pull request #1445 from nervosnetwork/testnet
Browse files Browse the repository at this point in the history
Deploy to mainnet
  • Loading branch information
rabbitz authored Sep 12, 2023
2 parents 1405533 + 8ab6232 commit 36c9301
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions app/models/ckb_sync/new_node_data_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1297,10 +1297,8 @@ def build_uncle_blocks!(node_block, local_block_id)
node_block.uncles.each do |uncle_block|
header = uncle_block.header
epoch_info = CkbUtils.parse_epoch_info(header)
UncleBlock.create!(
block_id: local_block_id,
UncleBlock.create_with(
compact_target: header.compact_target,
block_hash: header.hash,
number: header.number,
parent_hash: header.parent_hash,
nonce: header.nonce,
Expand All @@ -1313,6 +1311,9 @@ def build_uncle_blocks!(node_block, local_block_id)
proposals_count: uncle_block.proposals.count,
epoch: epoch_info.number,
dao: header.dao
).find_or_create_by!(
block_id: local_block_id,
block_hash: header.hash
)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/migration/async_missing_transactions.rake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace :migration do
txs_count2 = local_block.ckb_transactions.count
next if txs_count1 == txs_count2

puts "async missing block number: #{local_block.number} transactions count: #{txs_count1}"
puts "async missing block number: #{local_block.number}, rpc transactions count: #{txs_count1}, db transactions count: #{txs_count2}"

node_block = CkbSync::Api.instance.get_block_by_number(local_block.number)
CkbSync::NewNodeDataProcessor.new.process_block(node_block, refresh_balance: false)
Expand Down

0 comments on commit 36c9301

Please sign in to comment.