From 8cf4e5b8ee7791e61d3a6a5b992f09f5875197d9 Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Fri, 27 Nov 2015 21:32:41 +0100
Subject: [PATCH] Fix: random bug on Travis

---
 test/integration/tools/node.js | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/test/integration/tools/node.js b/test/integration/tools/node.js
index 74aabc9c8..734f8ddd2 100644
--- a/test/integration/tools/node.js
+++ b/test/integration/tools/node.js
@@ -100,10 +100,12 @@ function Node (dbName, options) {
         BlockchainService.prove(block, sigFunc, difficulty, next);
       },
       function (provenBlock, next){
-        logger.debug(provenBlock.getRawSigned());
-        post('/blockchain/block', {
-          "block": provenBlock.getRawSigned()
-        }, next);
+        if (provenBlock) {
+          logger.debug(provenBlock.getRawSigned());
+          post('/blockchain/block', {
+            "block": provenBlock.getRawSigned()
+          }, next);
+        }
       }
     ], done);
   }
-- 
GitLab