From 68652cd94d0cf3a94e36fbd631db83c201dc5908 Mon Sep 17 00:00:00 2001 From: Dion Ahmetaj Date: Thu, 2 Feb 2017 12:34:51 -0500 Subject: [PATCH] Added some //TODO comments pertaining to returning enums instead of bools in order to be better able to handle failure states. --- src/cryptonote_basic/miner.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index 08877c260..e654ac185 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -798,5 +798,10 @@ namespace cryptonote LOG_ERROR(__func__ << " : couldn't query power status"); return false; // shouldn't get here unless no support for querying battery status + // TODO: return enum with ability to signify failure in querying for power status + // and change bg-mining logic so that it stops. As @vtnerd states, with the current + // setup "If someone enabled background mining on a system that fails to grab ac + // status, it will just continually check with little hope of ever being resolved + // automagically". This is also the case for time/idle stats functions. } }