Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

node.bootstrap.rm oddity? #1707

Closed
Closed
@lifeBCE

Description

@lifeBCE
  • Version:
    0.33.1

  • Platform:
    Mac OS X 10.12.6
    Chrome: Version 70.0.3538.77 (Official Build) (64-bit)

  • Subsystem:
    ?

Type:

Possible Bug

Severity:

Low

Description:

Am I crazy or should this work?

      const self = this;
      const success = await Promise.all([
        '/dns4/node0.preload.ipfs.io/tcp/443/wss/ipfs/QmZMxNdpMkewiVZLMRxaNxUeZpDUb34pWjZ1kZvsd16Zic',
        '/dns4/node1.preload.ipfs.io/tcp/443/wss/ipfs/Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6',
      ].map((boot) => {
        return new Promise((resolve, reject) => {
          self.node.bootstrap.rm(boot, (err, res) =>{
            err ? reject(err) : resolve();
          });
        });
      }));

The second entry in the array is the one that gets removed but the first always remains. When I shift the order, the opposite one gets deleted but the other stays.

Oddly enough, this does work:

      const self = this;
      await new Promise((resolve, reject) => {
        const bad = '/dns4/node0.preload.ipfs.io/tcp/443/wss/ipfs/QmZMxNdpMkewiVZLMRxaNxUeZpDUb34pWjZ1kZvsd16Zic';
        self.node.bootstrap.rm(bad, (err, res) => {
          err ? reject(err) : resolve();
        });
      });

      await new Promise((resolve, reject) => {
        const bad = '/dns4/node1.preload.ipfs.io/tcp/443/wss/ipfs/Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6';
        self.node.bootstrap.rm(bad, (err, res) => {
          err ? reject(err) : resolve();
        });
      });

Steps to reproduce the error:

Execute the example code within a browser context and inspect the bootstrap nodes after.

Metadata

Metadata

Assignees

Labels

P3Low: Not priority right nowexp/noviceSomeone with a little familiarity can pick upkind/bugA bug in existing code (including security flaws)kind/resolved-in-heliastatus/readyReady to be worked

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions