We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41d12bf commit 17c8976Copy full SHA for 17c8976
test/accept-from.spec.js
@@ -8,10 +8,11 @@ const {
8
9
describe('Gossipsub acceptFrom', () => {
10
let gossipsub
11
- const sandbox = sinon.createSandbox()
+ let sandbox
12
let scoreStub
13
14
beforeEach(async () => {
15
+ sandbox = sinon.createSandbox()
16
sandbox.useFakeTimers()
17
gossipsub = new Gossipsub(await createPeer({ started: false }), { emitSelf: true })
18
scoreStub = sandbox.createStubInstance(PeerScore)
ts/index.ts
@@ -390,6 +390,8 @@ class Gossipsub extends Pubsub {
390
// Remove from peer scoring
391
this.score.removePeer(id)
392
393
+ this.acceptFromWhitelist.delete(id)
394
+
395
return peerStreams
396
}
397
0 commit comments