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
Description
-
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.