@serfab/cadre-core 1.18.0 → 1.19.0

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.
@@ -58,6 +58,7 @@ import { StrandWakeService, dialWake } from './strand-wake-protocol.js';
58
58
  import { StrandAddrService, collectStrandAddrs } from './strand-addr-protocol.js';
59
59
  import { DelegateAdmissionStore, extractCircuitRelayTargets, dueRelayAnnounces, prunePeerStrandKeys, peerStrandKey, recordRelayRefusals, relaysNotRefusing } from './delegate-admission.js';
60
60
  import { relayCircuitAddrs, resolveListenAddrs, resolveTransportOptions, RelayReservationFailedError } from './relay-addrs.js';
61
+ import { selfAddressesChanged } from './self-address-update.js';
61
62
  import { nodeTransportsOption } from './node-transports.js';
62
63
  import { resolveRelayServer } from './relay-server.js';
63
64
  import { replacesAdvertisedAddrs, resolveAnnounceAddrs } from './announce-addrs.js';
@@ -3243,8 +3244,11 @@ export class CadreNode {
3243
3244
  }, { label: 'control-reconcile', backstopMs });
3244
3245
  // Address churn re-publishes the self record AND re-checks the control cohort:
3245
3246
  // a relay-reservation rotation / NAT change can drop a sibling connection, so
3246
- // the next pass should re-observe and re-dial it.
3247
- this.selfPeerUpdateHandler = () => {
3247
+ // the next pass should re-observe and re-dial it. Only address churn: libp2p also
3248
+ // fires this for a protocol handler registered or removed (see selfAddressesChanged).
3249
+ this.selfPeerUpdateHandler = (event) => {
3250
+ if (!selfAddressesChanged(event.detail))
3251
+ return;
3248
3252
  republish('self:peer:update');
3249
3253
  this.controlReconcileRuns?.trigger(0);
3250
3254
  };