From db65bfbd9913be48edbca7673ba40b80333eafeb Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Sat, 30 Sep 2017 18:35:30 +0200
Subject: [PATCH] [fix] Do not emit twice the block event

---
 server.ts | 1 -
 1 file changed, 1 deletion(-)

diff --git a/server.ts b/server.ts
index 39fbd94f1..581ac19b1 100644
--- a/server.ts
+++ b/server.ts
@@ -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)
-- 
GitLab