//* DEBUG-DIE */ die('decodedData=' . print_r($decodedData, TRUE));
assert(isset($decodedData[self::PACKAGE_CONTENT_PRIVATE_KEY_HASH]));
+ // Don't accept empty keys
+ if (empty($decodedData[self::PACKAGE_CONTENT_PRIVATE_KEY_HASH])) {
+ // This needs fixing
+ die('[' . __METHOD__ . ':' . __LINE__ . ':] Empty private key hash: decodedData=' . print_r($decodedData, TRUE));
+ } // END - if
+
// There is no DHT entry so, accept the hash from decoded data
return $decodedData[self::PACKAGE_CONTENT_PRIVATE_KEY_HASH];
}
assert(isset($decodedArray[self::PACKAGE_CONTENT_SENDER]));
assert(isset($decodedArray[self::PACKAGE_CONTENT_MESSAGE]));
assert(isset($decodedArray[self::PACKAGE_CONTENT_HASH]));
+ assert(isset($decodedArray[self::PACKAGE_CONTENT_PRIVATE_KEY_HASH]));
// Is the feature enabled?
if (!FrameworkFeature::isFeatureAvailable('hubcoin_reward')) {
} // END - if
// Check validity
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __METHOD__ . ':' . __LINE__ . ']: senderId=' . $decodedArray[self::PACKAGE_CONTENT_SENDER] . ',message()=' . strlen($decodedArray[self::PACKAGE_CONTENT_MESSAGE]) . '),hash=' . $decodedArray[self::PACKAGE_CONTENT_HASH]);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __METHOD__ . ':' . __LINE__ . ']: senderId=' . $decodedArray[self::PACKAGE_CONTENT_SENDER] . ',message()=' . strlen($decodedArray[self::PACKAGE_CONTENT_MESSAGE]) . ',hash=' . $decodedArray[self::PACKAGE_CONTENT_HASH]);
//* DEBUG-DIE: */ die(__METHOD__ . ': decodedArray=' . print_r($decodedArray, TRUE));
$isHashValid = FrameworkFeature::callFeature('hubcoin_reward', 'checkHash', array($decodedArray[self::PACKAGE_CONTENT_SENDER] . ':' . $decodedArray[self::PACKAGE_CONTENT_MESSAGE] . ':' . $this->determineSenderPrivateKeyHash($decodedArray), $decodedArray[self::PACKAGE_CONTENT_HASH]));
$chainInstance->processMessage($decodedContent, $this);
/*
- * Post-processing of message data (this won't remote the message from
+ * Post-processing of message data (this won't remove the message from
* the stack).
*/
$chainInstance->postProcessMessage($this);