New Block Notification additions

Adding the block number, finder, amount, and difficulty to the new block
notification email
This commit is contained in:
Andy Mornes 2014-02-12 00:18:00 -06:00
parent c622d7c69b
commit 91a57903ce
2 changed files with 6 additions and 1 deletions

View File

@ -152,11 +152,16 @@ if (empty($aAllBlocks)) {
// Notify users
$aAccounts = $notification->getNotificationAccountIdByType('new_block');
if (is_array($aAccounts)) {
$finder = $user->getUserName($aBlock['account_id']);
foreach ($aAccounts as $aData) {
$aMailData['height'] = $aBlock['height'];
$aMailData['subject'] = 'New Block';
$aMailData['email'] = $user->getUserEmail($user->getUserName($aData['account_id']));
$aMailData['shares'] = $iRoundShares;
$aMailData['amount'] = $aBlock['amount'];
$aMailData['difficulty'] = $aBlock['difficulty'];
$aMailData['finder'] = $finder;
if (!$notification->sendNotification($aData['account_id'], 'new_block', $aMailData))
$log->logError('Failed to notify user of new found block: ' . $user->getUserName($aData['account_id']));
}

View File

@ -1,6 +1,6 @@
<html>
<p>Block Number {nocache}{$DATA.height}{/nocache} has been discovered by {nocache}{$DATA.finder}{/nocache} with a total value of {nocache}{$DATA.amount}{/nocache}! The current difficulty is {nocache}{$DATA.difficulty}{/nocache}.</p>
<body>
<p>A new block has been discovered!</p>
<br/>
<br/>
</body>