This repository was archived by the owner on Dec 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +10
-8
lines changed Expand file tree Collapse file tree 6 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,8 @@ export class Libp2pServer extends Server {
98
98
} )
99
99
} )
100
100
}
101
- ( this . node as Libp2pNode ) . on ( 'peer:discovery' , async ( peerInfo : any ) => {
101
+ // eslint-disable-next-line no-extra-semi
102
+ ; ( this . node as Libp2pNode ) . on ( 'peer:discovery' , async ( peerInfo : any ) => {
102
103
try {
103
104
const id = peerInfo . id . toB58String ( )
104
105
if ( this . peers . get ( id ) || this . isBanned ( id ) ) {
@@ -196,7 +197,8 @@ export class Libp2pServer extends Server {
196
197
if ( err ) {
197
198
return reject ( err )
198
199
}
199
- ( this . multiaddrs as string [ ] ) . forEach ( ( ma : any ) => peerInfo . multiaddrs . add ( ma ) )
200
+ // eslint-disable-next-line no-extra-semi
201
+ ; ( this . multiaddrs as string [ ] ) . forEach ( ( ma : any ) => peerInfo . multiaddrs . add ( ma ) )
200
202
resolve ( peerInfo )
201
203
}
202
204
if ( this . key ) {
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ export class RlpxServer extends Server {
120
120
*/
121
121
async stop ( ) : Promise < boolean > {
122
122
if ( this . started ) {
123
- ( this . rlpx as Devp2pRLPx ) . destroy ( )
123
+ ; ( this . rlpx as Devp2pRLPx ) . destroy ( ) // eslint-disable-line no-extra-semi
124
124
; ( this . dpt as Devp2pDPT ) . destroy ( )
125
125
await super . stop ( )
126
126
this . started = false
@@ -138,7 +138,7 @@ export class RlpxServer extends Server {
138
138
if ( ! this . started ) {
139
139
return false
140
140
}
141
- ( this . dpt as Devp2pDPT ) . banPeer ( peerId , maxAge )
141
+ ; ( this . dpt as Devp2pDPT ) . banPeer ( peerId , maxAge ) // eslint-disable-line no-extra-semi
142
142
return true
143
143
}
144
144
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ tape('[FastSynchronizer]', (t) => {
9
9
class PeerPool extends EventEmitter { }
10
10
td . replace ( '../../lib/net/peerpool' , PeerPool )
11
11
class BlockFetcher extends EventEmitter { }
12
- ( BlockFetcher . prototype as any ) . fetch = td . func ( )
12
+ ; ( BlockFetcher . prototype as any ) . fetch = td . func ( ) // eslint-disable-line no-extra-semi
13
13
td . replace ( '../../lib/sync/fetcher' , { BlockFetcher } )
14
14
const FastSynchronizer = require ( '../../lib/sync/fastsync' ) . FastSynchronizer
15
15
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ async function wait(delay?: number) {
11
11
12
12
tape ( '[BlockFetcher]' , ( t ) => {
13
13
class PeerPool extends EventEmitter { }
14
- ( PeerPool . prototype as any ) . idle = td . func ( ) // Need semi-colon to separate statements
14
+ ; ( PeerPool . prototype as any ) . idle = td . func ( ) // eslint-disable-line no-extra-semi
15
15
; ( PeerPool . prototype as any ) . ban = td . func ( )
16
16
td . replace ( '../../../lib/net/peerpool' , PeerPool )
17
17
const BlockFetcher = require ( '../../../lib/sync/fetcher/blockfetcher' ) . BlockFetcher
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ defaultLogger.silent = true
6
6
7
7
tape ( '[HeaderFetcher]' , ( t ) => {
8
8
class PeerPool extends EventEmitter { }
9
- ( PeerPool . prototype as any ) . idle = td . func ( ) // Need semi-colon to separate statements
9
+ ; ( PeerPool . prototype as any ) . idle = td . func ( ) // eslint-disable-line no-extra-semi
10
10
; ( PeerPool . prototype as any ) . ban = td . func ( )
11
11
td . replace ( '../../../lib/net/peerpool' , PeerPool )
12
12
const HeaderFetcher = require ( '../../../lib/sync/fetcher/headerfetcher' ) . HeaderFetcher
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ tape('[LightSynchronizer]', (t) => {
9
9
class PeerPool extends EventEmitter { }
10
10
td . replace ( '../../lib/net/peerpool' , PeerPool )
11
11
class HeaderFetcher extends EventEmitter { }
12
- ( HeaderFetcher . prototype as any ) . fetch = td . func ( )
12
+ ; ( HeaderFetcher . prototype as any ) . fetch = td . func ( ) // eslint-disable-line no-extra-semi
13
13
td . replace ( '../../lib/sync/fetcher' , { HeaderFetcher } )
14
14
const LightSynchronizer = require ( '../../lib/sync/lightsync' ) . LightSynchronizer
15
15
You can’t perform that action at this time.
0 commit comments