]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/producer/miner/blocks/class_MinerTestGenesisBlockProducer.php
Continued:
[hub.git] / application / hub / main / producer / miner / blocks / class_MinerTestGenesisBlockProducer.php
index 140fbb77e2eb5acc7ad23d91d3a17d24357fabe4..e0329ac3ab13a3926844834fb574939b267ee2de 100644 (file)
@@ -41,6 +41,12 @@ class MinerTestGenesisBlockProducer extends BaseBlockProducer implements BlockPr
                // Get new instance
                $producerInstance = new MinerTestGenesisBlockProducer();
 
+               // Get a (minable) hash block instance
+               $minableInstance = ObjectFactory::createObjectByConfiguredName('miner_test_hash_block_class');
+
+               // Set it here
+               $producerInstance->setMinableInstance($minableInstance);
+
                // Return the prepared instance
                return $producerInstance;
        }
@@ -54,6 +60,12 @@ class MinerTestGenesisBlockProducer extends BaseBlockProducer implements BlockPr
         */
        protected function initProducer () {
                $this->partialStub('Please implement this method.');
+
+               // As last step, change the state of the miner, get the miner first
+               $minerInstance = Registry::getRegistry()->getInstance('miner');
+
+               // Change state to next state
+               $minerInstance->blockProducerHasInitialized();
        }
 
        /**