trac-msb 0.1.46 → 0.1.47
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.
- package/Whitelist/pubkeys.csv +1 -1
- package/package.json +1 -1
- package/src/index.js +5 -1
package/Whitelist/pubkeys.csv
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
b9b6180146d1ad25874a73951e81bef08bd665a349431a56266afdc8f1c36a9c
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -760,7 +760,11 @@ export class MainSettlementBus extends ReadyResource {
|
|
|
760
760
|
|
|
761
761
|
async tryConnection(address, type = 'validator'){
|
|
762
762
|
if(null === this.#swarm) return null;
|
|
763
|
-
|
|
763
|
+
if(this.#network.validator_stream !== null && address !== b4a.toString(this.#network.validator_stream.remotePublicKey, 'hex')){
|
|
764
|
+
this.#swarm.leavePeer(this.#network.validator_stream.remotePublicKey);
|
|
765
|
+
this.#network.validator_stream = null;
|
|
766
|
+
this.#network.validator = null;
|
|
767
|
+
}
|
|
764
768
|
// trying to join a peer from the global swarm
|
|
765
769
|
if(false === this.#swarm.peers.has(address)){
|
|
766
770
|
this.#swarm.joinPeer(b4a.from(address, 'hex'));
|