* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class MinerBootingState extends BaseMinerState implements Stateable {
+ /**
+ * Array of booted producers
+ */
+ private $bootedProducer = array();
+
/**
* Protected constructor
*
* @return void
*/
public function executeState (Executor $executorInstance) {
+ // Has this executor (producer) run?
+ if (isset($this->bootedProducer[$executorInstance->__toString()])) {
+ // Then silently skip this
+ return;
+ } // END - if
+
// Debug message
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('MINER-STATE: Calling prepareBlockProduction() on ' . $executorInstance->__toString() . ' ...');
// Now prepare the unit production to maybe become 'virgin' or 'active' if work/test units are there
$executorInstance->prepareBlockProduction($this);
+
+ // Mark producer as booted
+ $this->bootedProducer[$executorInstance->__toString()] = TRUE;
}
}