diff --git a/src/cons/cons.cpp b/src/cons/cons.cpp index 8b2ad5a9..01d389f8 100644 --- a/src/cons/cons.cpp +++ b/src/cons/cons.cpp @@ -210,12 +210,16 @@ namespace cons if (ctx.stage == 3) { - if (apply_ledger(stg_prop) == -1) - return -1; - - // node has finished a consensus round (all 4 stages). - LOG_INFO << "****Stage 3 consensus reached**** (lcl:" << ctx.lcl.substr(0, 15) - << " state:" << ctx.state << ")"; + if (apply_ledger(stg_prop) != -1) + { + // node has finished a consensus round (all 4 stages). + LOG_INFO << "****Stage 3 consensus reached**** (lcl:" << ctx.lcl.substr(0, 15) + << " state:" << ctx.state << ")"; + } + else + { + LOG_ERR << "Error occured in Stage 3 consensus execution."; + } } } } @@ -775,7 +779,10 @@ namespace cons // TODO: Do something usefull with HP<-->SC channel. if (sc::execute_contract(ctx.contract_ctx) == -1) + { + LOG_ERR << "Contract execution failed."; return -1; + } ctx.state = args.post_execution_state_hash; extract_user_outputs_from_contract_bufmap(args.userbufs); diff --git a/src/hpfs/hpfs.cpp b/src/hpfs/hpfs.cpp index 63ba560e..693ed5fe 100644 --- a/src/hpfs/hpfs.cpp +++ b/src/hpfs/hpfs.cpp @@ -99,7 +99,10 @@ namespace hpfs // Check if process is still running. if (kill(pid, 0) == -1) + { + LOG_ERR << "hpfs process " << pid << " has stopped."; break; + } // If hash map is enabled we check whether stat succeeds on the root hash. // If not, we check whether the inode no. of the mounted root dir is 1. @@ -107,7 +110,7 @@ namespace hpfs hpfs_initialized = (stat(check_path.c_str(), &st) == 0 && (hash_map_enabled || st.st_ino == 1)); - } while (!hpfs_initialized && ++retry_count < 100); + } while (!hpfs_initialized && ++retry_count < 200); // Kill the process if hpfs couldn't be initialized after the wait period. if (!hpfs_initialized)