+
+ /**
+ * Feeds the hash and sender (as recipient for the 'sender' reward) to the
+ * miner's queue, unless the message is not a "reward claim" message as this
+ * leads to an endless loop. You may wish to run the miner to get some
+ * reward ("HubCoins") for "mining" this hash.
+ *
+ * @param $decodedDataArray Array with decoded message
+ * @return void
+ * @todo ~10% done?
+ */
+ public function feedHashToMiner (array $decodedDataArray) {
+ // Make sure the required elements are there
+ assert(isset($decodedDataArray[self::PACKAGE_CONTENT_SENDER]));
+ assert(isset($decodedDataArray[self::PACKAGE_CONTENT_HASH]));
+ assert(isset($decodedDataArray[self::PACKAGE_CONTENT_TAGS]));
+
+ // Resolve session id ('sender' is a session id) into node id
+ $nodeId = HubTools::resolveNodeIdBySessionId($decodedDataArray[self::PACKAGE_CONTENT_SENDER]);
+
+ // Is 'claim_reward' the message type?
+ if (in_array('claim_reward', $decodedDataArray[self::PACKAGE_CONTENT_TAGS])) {
+ /*
+ * Then don't feed this message to the miner as this causes and
+ * endless loop of mining.
+ */
+ return;
+ } // END - if
+
+ $this->partialStub('@TODO nodeId=' . $nodeId . ',decodedDataArray=' . print_r($decodedDataArray, TRUE));
+ }