@olane/o-node 0.7.12-alpha.13 → 0.7.12-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,7 +46,6 @@ export declare class oConnectionHeartbeatManager extends oObject {
46
46
  private handleConnectionDead;
47
47
  private emitConnectionDegradedEvent;
48
48
  private emitConnectionRecoveredEvent;
49
- private extractPeerIdFromAddress;
50
49
  /**
51
50
  * Get current health status of all connections
52
51
  */
@@ -1 +1 @@
1
- {"version":3,"file":"o-connection-heartbeat.manager.d.ts","sourceRoot":"","sources":["../../../src/managers/o-connection-heartbeat.manager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAOR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;CACzC;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,2BAA4B,SAAQ,OAAO;IAKpD,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,MAAM;IALhB,OAAO,CAAC,iBAAiB,CAAC,CAAiB;IAC3C,OAAO,CAAC,SAAS,CAAuC;gBAG9C,IAAI,EAAE,kBAAkB,EACxB,MAAM,EAAE,eAAe;IAK3B,KAAK;IAqBL,IAAI;YAQI,qBAAqB;IA0CnC,OAAO,CAAC,MAAM;YAOA,UAAU;IAuFxB,OAAO,CAAC,oBAAoB;IAyD5B,OAAO,CAAC,2BAA2B;IAmBnC,OAAO,CAAC,4BAA4B;IAiBpC,OAAO,CAAC,wBAAwB;IAahC;;OAEG;IACH,eAAe,IAAI,gBAAgB,EAAE;IAIrC;;OAEG;IACH,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,GAAG,SAAS;IAIxE;;OAEG;IACH,SAAS,IAAI,eAAe;CAG7B"}
1
+ {"version":3,"file":"o-connection-heartbeat.manager.d.ts","sourceRoot":"","sources":["../../../src/managers/o-connection-heartbeat.manager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAOR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;CACzC;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,2BAA4B,SAAQ,OAAO;IAKpD,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,MAAM;IALhB,OAAO,CAAC,iBAAiB,CAAC,CAAiB;IAC3C,OAAO,CAAC,SAAS,CAAuC;gBAG9C,IAAI,EAAE,kBAAkB,EACxB,MAAM,EAAE,eAAe;IAK3B,KAAK;IAqBL,IAAI;YAQI,qBAAqB;IAyCnC,OAAO,CAAC,MAAM;YAMA,UAAU;IAuFxB,OAAO,CAAC,oBAAoB;IAyD5B,OAAO,CAAC,2BAA2B;IAmBnC,OAAO,CAAC,4BAA4B;IAiBpC;;OAEG;IACH,eAAe,IAAI,gBAAgB,EAAE;IAIrC;;OAEG;IACH,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,GAAG,SAAS;IAIxE;;OAEG;IACH,SAAS,IAAI,eAAe;CAG7B"}
@@ -55,7 +55,6 @@ export class oConnectionHeartbeatManager extends oObject {
55
55
  // Use this.node.parent getter to get the current parent address with transports
56
56
  // rather than getParents() which may have a stale reference
57
57
  const parent = this.node.parent;
58
- this.logger.debug('Parent address:', parent);
59
58
  if (parent) {
60
59
  targets.push({ address: parent, role: 'parent' });
61
60
  }
@@ -71,10 +70,7 @@ export class oConnectionHeartbeatManager extends oObject {
71
70
  await Promise.allSettled(targets.map((target) => this.pingTarget(target.address, target.role)));
72
71
  }
73
72
  doPing(address) {
74
- return this.node.use(address, {
75
- method: 'ping',
76
- params: {},
77
- });
73
+ return this.node.p2pNode.services.ping.ping(address.libp2pTransports[0].toMultiaddr());
78
74
  }
79
75
  async pingTarget(address, role) {
80
76
  if (!address.libp2pTransports.length) {
@@ -193,18 +189,6 @@ export class oConnectionHeartbeatManager extends oObject {
193
189
  role: eventRole,
194
190
  }));
195
191
  }
196
- extractPeerIdFromAddress(address) {
197
- // Extract peerId from transport multiaddr
198
- for (const transport of address.transports) {
199
- const multiaddr = transport.toString();
200
- // Multiaddr format: /ip4/127.0.0.1/tcp/4001/p2p/QmPeerId
201
- const parts = multiaddr.split('/p2p/');
202
- if (parts.length === 2) {
203
- return parts[1];
204
- }
205
- }
206
- return null;
207
- }
208
192
  /**
209
193
  * Get current health status of all connections
210
194
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olane/o-node",
3
- "version": "0.7.12-alpha.13",
3
+ "version": "0.7.12-alpha.14",
4
4
  "type": "module",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -54,12 +54,12 @@
54
54
  "typescript": "5.4.5"
55
55
  },
56
56
  "dependencies": {
57
- "@olane/o-config": "0.7.12-alpha.13",
58
- "@olane/o-core": "0.7.12-alpha.13",
59
- "@olane/o-protocol": "0.7.12-alpha.13",
60
- "@olane/o-tool": "0.7.12-alpha.13",
57
+ "@olane/o-config": "0.7.12-alpha.14",
58
+ "@olane/o-core": "0.7.12-alpha.14",
59
+ "@olane/o-protocol": "0.7.12-alpha.14",
60
+ "@olane/o-tool": "0.7.12-alpha.14",
61
61
  "debug": "^4.4.1",
62
62
  "dotenv": "^16.5.0"
63
63
  },
64
- "gitHead": "dad019b117feb02f74eeec70de9ee82b76b68f6c"
64
+ "gitHead": "b9f0135b2527de652c2c64beffb6e427686d7411"
65
65
  }