Compare commits

...

3 Commits

Author SHA1 Message Date
semantic-release-bot 31465e3a63 chore(release): 0.1.0-develop.31 [skip ci]
# [0.1.0-develop.31](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.30...v0.1.0-develop.31) (2023-09-02)

### Bug Fixes

* fix iteration of peers ([fabda02](fabda024ad))
2023-09-02 00:47:29 +00:00
Derrick Hammer e821da5a27
Merge remote-tracking branch 'origin/develop' into develop 2023-09-01 20:46:41 -04:00
Derrick Hammer fabda024ad
fix: fix iteration of peers 2023-09-01 20:46:37 -04:00
4 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,10 @@
# [0.1.0-develop.31](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.30...v0.1.0-develop.31) (2023-09-02)
### Bug Fixes
* fix iteration of peers ([fabda02](https://git.lumeweb.com/LumeWeb/libs5/commit/fabda024ad788fcb00e398e73f75afb3e944db30))
# [0.1.0-develop.30](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.29...v0.1.0-develop.30) (2023-09-02)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/libs5",
"version": "0.1.0-develop.30",
"version": "0.1.0-develop.31",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/libs5",
"version": "0.1.0-develop.30",
"version": "0.1.0-develop.31",
"dependencies": {
"@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/libs5",
"version": "0.1.0-develop.30",
"version": "0.1.0-develop.31",
"type": "module",
"main": "lib/index.js",
"repository": {

View File

@ -100,7 +100,7 @@ export class RegistryService {
this.logger.verbose("[registry] broadcastEntry");
const updateMessage = this.serializeRegistryEntry(sre);
for (const p of Object.values(this.node.services.p2p.peers)) {
for (const p of [...this.node.services.p2p.peers.values()]) {
if (receivedFrom == null || p.id !== receivedFrom.id) {
p.sendMessage(updateMessage);
}
@ -116,7 +116,7 @@ export class RegistryService {
const req = p.takeBytes();
// TODO: Use shard system if there are more than X peers
for (const peer of Object.values(this.node.services.p2p.peers)) {
for (const peer of [...this.node.services.p2p.peers.values()]) {
peer.sendMessage(req);
}
}