Skip to content

Commit c6ad5b1

Browse files
committed
Fix: Link only relevant peers to channels
Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com>
1 parent 31f8499 commit c6ad5b1

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6601,12 +6601,8 @@ classDef subgraph_padding fill:none,stroke:none
66016601
66026602
%% Connections
66036603
peer0_org1_example_com --> channel_my_channel1
6604-
peer1_org1_example_com --> channel_my_channel1
66056604
peer0_org2_example_com --> channel_my_channel1
6606-
peer1_org2_example_com --> channel_my_channel1
6607-
peer0_org1_example_com --> channel_my_channel2
66086605
peer1_org1_example_com --> channel_my_channel2
6609-
peer0_org2_example_com --> channel_my_channel2
66106606
peer1_org2_example_com --> channel_my_channel2
66116607
peer0_org1_example_com --> channel_my_channel3
66126608
peer1_org1_example_com --> channel_my_channel3

src/export-network-topology/generateMermaidDiagram.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,7 @@ export function generateMermaidDiagram(config: FabloConfigExtended): string {
8787
const channelIdStr = channelId(channel.name);
8888

8989
channel.orgs?.forEach((orgOnChannel) => {
90-
const org = config.orgs?.find((o) => o.name === orgOnChannel.name);
91-
if (!org) return;
92-
93-
// Connect peers to channel
94-
org.peers?.forEach((peer) => {
90+
orgOnChannel.peers?.forEach((peer) => {
9591
lines.push(` ${safeId(peer.address)} --> ${channelIdStr}`);
9692
});
9793
});

0 commit comments

Comments
 (0)