Skip to content

Commit fc4a2a4

Browse files
committed
Update to TermRewards Logging
1 parent 0656902 commit fc4a2a4

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/smartrewards/rewards.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -726,40 +726,41 @@ void CSmartRewards::ProcessOutput(const CTransaction& tx, const CTxOut& out, uin
726726
rTermEntry->expires = out.GetLockTime();
727727
rTermEntry->balance = out.nValue;
728728
}
729-
LogPrintf("CSmartRewards::ProcessOutput: Output qualifies for %s TermRewards\n", rTermEntry->GetLevel());
729+
LogPrintf("CSmartRewards::ProcessOutput: %s qualifies for %s SmartRetire\n", rTermEntry->ToString() ,rTermEntry->GetLevel());
730730
} else if ( (out.GetLockTime() > (nTime + 63113904 - 2680000)) && (out.GetLockTime() < (nTime + 63113904 + 2680000)) ) { // 2 years within 1 month
731731
if (GetTermRewardEntry({id, tx.GetHash()}, rTermEntry, true)) {
732732
rTermEntry->level = CTermRewardEntry::TwoYears;
733733
rTermEntry->percent = 40;
734734
rTermEntry->expires = out.GetLockTime();
735735
rTermEntry->balance = out.nValue;
736736
}
737-
LogPrintf("CSmartRewards::ProcessOutput: Output qualifies for %s TermRewards\n", rTermEntry->GetLevel());
737+
LogPrintf("CSmartRewards::ProcessOutput: %s qualifies for %s SmartRetire\n", rTermEntry->ToString() ,rTermEntry->GetLevel());
738738
} else if ( (out.GetLockTime() > (nTime + 94670856 - 2680000)) && (out.GetLockTime() < (nTime + 94670856 + 2680000)) ) { // 3 years within 1 month
739739
if (GetTermRewardEntry({id, tx.GetHash()}, rTermEntry, true)) {
740740
rTermEntry->level = CTermRewardEntry::ThreeYears;
741741
rTermEntry->percent = 45;
742742
rTermEntry->expires = out.GetLockTime();
743743
rTermEntry->balance = out.nValue;
744744
}
745-
LogPrintf("CSmartRewards::ProcessOutput: Output qualifies for %s TermRewards\n", rTermEntry->GetLevel());
745+
LogPrintf("CSmartRewards::ProcessOutput: %s qualifies for %s SmartRetire\n", rTermEntry->ToString() ,rTermEntry->GetLevel());
746746
} else if ( (out.GetLockTime() > (nTime + 473354280 - 2680000)) && (out.GetLockTime() < (nTime + 473354280 + 2680000)) ) { // 15 years within 1 month
747747
if (GetTermRewardEntry({id, tx.GetHash()}, rTermEntry, true)) {
748748
rTermEntry->level = CTermRewardEntry::FifteenYears;
749749
rTermEntry->percent = 50;
750750
rTermEntry->expires = out.GetLockTime();
751751
rTermEntry->balance = out.nValue;
752752
}
753-
LogPrintf("CSmartRewards::ProcessOutput: Output qualifies for %s SmartRetire\n", rTermEntry->GetLevel());
753+
LogPrintf("CSmartRewards::ProcessOutput: %s qualifies for %s SmartRetire\n", rTermEntry->ToString() ,rTermEntry->GetLevel());
754754
}
755755
} else if (rEntry->id == CSmartAddress("8JqVJ84KeHLNfUg8qBHUkk98oALCytUXLE") && out.nValue >= 1000000 * COIN) {
756756
if (GetTermRewardEntry({CSmartAddress("SdxQe3eBD7VrUQjd7iyXVjFWKm6GrRP6W9"), tx.GetHash()}, rTermEntry, true)) {
757757
rTermEntry->level = CTermRewardEntry::FifteenYears;
758758
rTermEntry->percent = 50;
759-
rTermEntry->expires = 2111940508;
759+
rTermEntry->expires = 2088527221;
760760
rTermEntry->balance = out.nValue;
761761
}
762-
LogPrintf("CSmartRewards::ProcessOutput: Output qualifies for %s SmartRetire\n", rTermEntry->GetLevel());
762+
LogPrintf("CSmartRewards::ProcessOutput: %s qualifies for %s SmartRetire\n", rTermEntry->ToString() ,rTermEntry->GetLevel());
763+
LogPrintf("CSmartRewards::ProcessOutput: Converted from script %s \n", rEntry->ToString());
763764
}
764765

765766
if (Is_1_3(nCurrentRound) && tx.IsCoinBase()) {

0 commit comments

Comments
 (0)