cluster/services/ipfs: fix Peering.Peers format

This commit is contained in:
Max Headroom 2022-11-14 00:49:38 +01:00
parent 16bdf7348e
commit 70970765ac
2 changed files with 8 additions and 3 deletions

View file

@ -14,8 +14,10 @@
VEGAS = "Qmd7QHZU8UjfYdwmjmq1SBh9pvER9AwHpfwQvnvNo3HBBo";
prophet = "12D3KooWQWsHPUUeFhe4b6pyCaD1hBoj8j6Z7S7kTznRTh1p1eVt";
}.${name};
multiaddrTcp = "/ip4/${self.ipv4}/tcp/${self.portStr}/p2p/${self.extra.peerId}";
multiaddrQuic = "/ip4/${self.ipv4}/udp/${self.portStr}/quic/p2p/${self.extra.peerId}";
multiaddrs = [
"/ip4/${self.ipv4}/udp/${self.portStr}/quic"
"/ip4/${self.ipv4}/tcp/${self.portStr}"
];
};
};
});

View file

@ -57,7 +57,10 @@ in
Access-Control-Allow-Methods = [ "PUT" "POST" ];
};
Peering.Peers = map
(name: cluster.config.hostLinks.${name}.ipfs.extra.multiaddrQuic)
(name: let inherit (cluster.config.hostLinks.${name}.ipfs) extra; in {
ID = extra.peerId;
Addrs = extra.multiaddrs;
})
cluster.config.services.ipfs.otherNodes.node;
Gateway = {
Writable = false;