Skip to content

Commit e16223e

Browse files
Notify when a transaction has gone live
1 parent 0610e35 commit e16223e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/omnicore/notifications.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,15 @@ bool CheckExpiredAlerts(unsigned int curBlock, uint64_t curTime)
149149
PrintToLog("Expiring alert (from %s: type:%d expiry:%d message:%s)\n", alert.alert_sender,
150150
alert.alert_type, alert.alert_expiry, alert.alert_message);
151151
it = currentOmniAlerts.erase(it);
152+
153+
// if expiring a feature activation because it's gone live, add another notification
154+
// to say we're now live and expire it in 1024 blocks.
155+
size_t replacePosition = alert.alert_message.find("') will go live at block ");
156+
if (replacePosition != std::string::npos) {
157+
std::string newAlertMessage = alert.alert_message.substr(0, replacePosition) + "') is now live.";
158+
AddAlert("omnicore", 1, curBlock + 1024, newAlertMessage);
159+
}
160+
152161
uiInterface.OmniStateChanged();
153162
} else {
154163
it++;

0 commit comments

Comments
 (0)