From 45e23e18684a1298bc6817e4d90ccabfa0b0b63d Mon Sep 17 00:00:00 2001 From: Rabbit Date: Tue, 17 Dec 2024 14:00:46 +0800 Subject: [PATCH] chore: add udt info to graph channel response --- app/views/api/v2/fiber/graph_nodes/show.jbuilder | 2 +- app/workers/fiber_graph_detect_worker.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/api/v2/fiber/graph_nodes/show.jbuilder b/app/views/api/v2/fiber/graph_nodes/show.jbuilder index d0dadbc14..2cc5aeb58 100644 --- a/app/views/api/v2/fiber/graph_nodes/show.jbuilder +++ b/app/views/api/v2/fiber/graph_nodes/show.jbuilder @@ -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 diff --git a/app/workers/fiber_graph_detect_worker.rb b/app/workers/fiber_graph_detect_worker.rb index 1cb22a28b..a39d9fd7f 100644 --- a/app/workers/fiber_graph_detect_worker.rb +++ b/app/workers/fiber_graph_detect_worker.rb @@ -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|