Compare commits

...

7 Commits

Author SHA1 Message Date
Vasco Santos
aec8e3d3bb chore: release version v0.30.7 2021-02-01 18:40:05 +01:00
Vasco Santos
3abf4aeb35 chore: update contributors 2021-02-01 18:40:05 +01:00
Alex Potsides
a36b2112aa fix: do not add observed address received from peers (#882) 2021-02-01 18:32:57 +01:00
Vasco Santos
8d3b61710a chore: release version v0.30.6 2021-01-29 14:39:41 +01:00
Vasco Santos
5dbbeef311 chore: update contributors 2021-01-29 14:39:41 +01:00
Vasco Santos
3e7594f697 fix: peer discovery type in config (#878)
to any
2021-01-29 14:32:13 +01:00
Alex Potsides
ce2a624a09 fix: unref nat manager retries (#877)
The retry operation in the NAT Manager can prevent node from shutting
down, so unref the retries so they don't keep adding work to the
event loop.
2021-01-29 14:09:59 +01:00
5 changed files with 26 additions and 10 deletions

View File

@@ -1,3 +1,22 @@
## [0.30.7](https://github.com/libp2p/js-libp2p/compare/v0.30.6...v0.30.7) (2021-02-01)
### Bug Fixes
* do not add observed address received from peers ([#882](https://github.com/libp2p/js-libp2p/issues/882)) ([a36b211](https://github.com/libp2p/js-libp2p/commit/a36b2112aafcee309a02de0cff5440cf69cd53a7))
## [0.30.6](https://github.com/libp2p/js-libp2p/compare/v0.30.5...v0.30.6) (2021-01-29)
### Bug Fixes
* peer discovery type in config ([#878](https://github.com/libp2p/js-libp2p/issues/878)) ([3e7594f](https://github.com/libp2p/js-libp2p/commit/3e7594f69733bf374b374a6065458fa6cae81c5f))
* unref nat manager retries ([#877](https://github.com/libp2p/js-libp2p/issues/877)) ([ce2a624](https://github.com/libp2p/js-libp2p/commit/ce2a624a09b3107c0b2b4752e666804ecea54fb5))
## [0.30.5](https://github.com/libp2p/js-libp2p/compare/v0.30.4...v0.30.5) (2021-01-28)

View File

@@ -1,6 +1,6 @@
{
"name": "libp2p",
"version": "0.30.5",
"version": "0.30.7",
"description": "JavaScript implementation of libp2p, a modular peer to peer network stack",
"leadMaintainer": "Jacob Heun <jacobheun@gmail.com>",
"main": "src/index.js",

View File

@@ -202,9 +202,9 @@ class IdentifyService {
this.peerStore.protoBook.set(id, protocols)
this.peerStore.metadataBook.set(id, 'AgentVersion', uint8ArrayFromString(message.agentVersion))
// TODO: Score our observed addr
// TODO: Add and score our observed addr
log('received observed address of %s', observedAddr)
this.addressManager.addObservedAddr(observedAddr)
// this.addressManager.addObservedAddr(observedAddr)
}
/**

View File

@@ -51,9 +51,6 @@ const { updateSelfPeerRecord } = require('./record/utils')
* @typedef {Object} PeerStoreOptions
* @property {boolean} persistence
*
* @typedef {Object} PeerDiscoveryOptions
* @property {boolean} autoDial
*
* @typedef {Object} RelayOptions
* @property {boolean} enabled
* @property {import('./circuit').RelayAdvertiseOptions} advertise
@@ -62,7 +59,7 @@ const { updateSelfPeerRecord } = require('./record/utils')
*
* @typedef {Object} Libp2pConfig
* @property {Object} [dht] dht module options
* @property {PeerDiscoveryOptions} [peerDiscovery]
* @property {Object} [peerDiscovery]
* @property {Pubsub} [pubsub] pubsub module options
* @property {RelayOptions} [relay]
* @property {Record<string, Object>} [transport] transport options indexed by transport key

View File

@@ -138,9 +138,9 @@ class NatManager {
this._client = {
// these are all network operations so add a retry
map: (...args) => retry(() => map(...args), { onFailedAttempt: log.error }),
destroy: (...args) => retry(() => destroy(...args), { onFailedAttempt: log.error }),
externalIp: (...args) => retry(() => externalIp(...args), { onFailedAttempt: log.error })
map: (...args) => retry(() => map(...args), { onFailedAttempt: log.error, unref: true }),
destroy: (...args) => retry(() => destroy(...args), { onFailedAttempt: log.error, unref: true }),
externalIp: (...args) => retry(() => externalIp(...args), { onFailedAttempt: log.error, unref: true })
}
return this._client