Skip to content
Snippets Groups Projects
Commit db65bfbd authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] Do not emit twice the block event

parent 463b86aa
No related branches found
No related tags found
No related merge requests found
......@@ -191,7 +191,6 @@ export class Server extends stream.Duplex implements HookableServer {
this.BlockchainService
.pipe(es.mapSync((e:any) => {
if (e.bcEvent === OtherConstants.BC_EVENT.HEAD_CHANGED || e.bcEvent === OtherConstants.BC_EVENT.SWITCHED) {
this.emitDocument(e.block, DuniterDocument.ENTITY_BLOCK)
this.emit('bcEvent', e)
}
this.streamPush(e)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment