Skip to content

Commit

Permalink
chore: add udt info to graph channel response
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitz committed Dec 17, 2024
1 parent 0043b7f commit 45e23e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/api/v2/fiber/graph_nodes/show.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ json.data do
json.udt_cfg_infos @node.udt_cfg_infos

json.fiber_graph_channels @graph_channels do |channel|
json.(channel, :channel_outpoint, :node1, :node2, :chain_hash, :open_transaction_info, :closed_transaction_info)
json.(channel, :channel_outpoint, :node1, :node2, :chain_hash, :open_transaction_info, :closed_transaction_info, :udt_info)
json.funding_tx_block_number channel.funding_tx_block_number.to_s
json.funding_tx_index channel.funding_tx_index.to_s
json.last_updated_timestamp channel.last_updated_timestamp.to_s
Expand Down
4 changes: 2 additions & 2 deletions app/workers/fiber_graph_detect_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ def perform
# sync graph nodes and channels
["nodes", "channels"].each { fetch_graph_infos(_1) }
# purge outdated graph nodes
FiberGraphNode.where.not(node_id: @graph_node_ids).delete_all
FiberGraphNode.where.not(node_id: @graph_node_ids).destroy_all
# purge outdated graph channels
FiberGraphChannel.where.not(channel_outpoint: @graph_channel_outpoints).delete_all
FiberGraphChannel.where.not(channel_outpoint: @graph_channel_outpoints).destroy_all

# check channel is closed
FiberGraphChannel.open_channels.each do |channel|
Expand Down

0 comments on commit 45e23e1

Please sign in to comment.