From befa8e8f2268cebdcded4b40ba23cab9a2065712 Mon Sep 17 00:00:00 2001 From: emizzle Date: Fri, 22 Jun 2018 15:17:51 +1000 Subject: [PATCH] Fix for embark upload failing when embark-solc plugin is installed. It was simply too fast with the solc plugin and the blockchain node was not yet ready before solc would try to compile and deploy, and would error out while estimating gas costs. --- lib/index.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/index.js b/lib/index.js index 858292ca..e206ef04 100644 --- a/lib/index.js +++ b/lib/index.js @@ -346,12 +346,15 @@ class Embark { }) .catch(callback); }); - - engine.events.request('deploy:contracts', function (err) { - engine.logger.info(__("finished deploying").underline); - if (err) { - callback(err); - } + engine.events.on('check:backOnline:Ethereum', function () { + engine.logger.info(__('Ethereum node detected') + '..'); + engine.config.reloadConfig(); + engine.events.request('deploy:contracts', function (err) { + if (err) { + return; + } + engine.logger.info(__('Deployment Done')); + }); }); } ], function (err, _result) {