diff --git a/packages/concordia-pinner/.eslintrc.js b/packages/concordia-pinner/.eslintrc.js index 9625123..d6c80de 100755 --- a/packages/concordia-pinner/.eslintrc.js +++ b/packages/concordia-pinner/.eslintrc.js @@ -44,6 +44,7 @@ module.exports = { 'no-console': 'off', 'no-shadow': 'warn', 'no-multi-str': 'warn', + 'no-underscore-dangle': 0, 'jsx-a11y/label-has-associated-control': [2, { labelAttributes: ['label'], controlComponents: ['Input'], diff --git a/packages/concordia-pinner/src/app.js b/packages/concordia-pinner/src/app.js index 690e450..c2fa553 100644 --- a/packages/concordia-pinner/src/app.js +++ b/packages/concordia-pinner/src/app.js @@ -19,7 +19,6 @@ const responseBody = { async function getStats(orbit) { try { - // eslint-disable-next-line no-underscore-dangle const ipfs = orbit._ipfs; const { id } = await ipfs.id(); const peers = await ipfs.swarm.peers(); diff --git a/packages/concordia-pinner/src/index.js b/packages/concordia-pinner/src/index.js index aa5dbb2..0d3c803 100644 --- a/packages/concordia-pinner/src/index.js +++ b/packages/concordia-pinner/src/index.js @@ -84,6 +84,14 @@ const main = async () => { topics: [eventJsonInterface.signature], }, handleWeb3LogEvent(web3, eventJsonInterface, orbit)); + orbit._ipfs.libp2p.connectionManager.on( + 'peer:connect', + (peerInfo) => console.log('Peer connected: ', peerInfo.remotePeer.toB58String()), + ); + orbit._ipfs.libp2p.connectionManager.on( + 'peer:disconnect', + (peerInfo) => console.log('Peer disconnected: ', peerInfo.remotePeer.toB58String()), + ); startAPI(orbit); }))); };