Skip to content

Commit

Permalink
fix: directly delete all tx (#2294)
Browse files Browse the repository at this point in the history
Signed-off-by: Miles Zhang <[email protected]>
  • Loading branch information
zmcNotafraid authored Nov 20, 2024
1 parent a533f8e commit daf47aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def cache_keys
def invalid!
uncle_blocks.delete_all
# delete_address_txs_cache
ckb_transactions.destroy_all
ckb_transactions.delete_all
ForkedBlock.create(attributes)
destroy
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/ckb_transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CkbTransaction < ApplicationRecord

has_many :referring_cells, dependent: :delete_all
has_many :token_transfers, foreign_key: :transaction_id, dependent: :delete_all, inverse_of: :ckb_transaction
# has_many :cell_dependencies, dependent: :delete_all
has_many :cell_dependencies, dependent: :delete_all
has_many :header_dependencies, dependent: :delete_all
has_many :witnesses, dependent: :delete_all

Expand Down

0 comments on commit daf47aa

Please sign in to comment.