Drop upgrade-cancel callback registration for a generic "resumeable"

Instead of passing a StartShutdown reference all the way up from
txdb, give ShowProgress a "resumeable" boolean, which is used to
inform the user if the action will be resumed, but cancel is always
allowed by just calling StartShutdown().
This commit is contained in:
Matt Corallo
2017-07-07 17:09:55 -04:00
parent 22e301a3d5
commit ee4d1493e2
5 changed files with 25 additions and 39 deletions

View File

@@ -94,11 +94,11 @@ public:
/** A wallet has been loaded. */
boost::signals2::signal<void (CWallet* wallet)> LoadWallet;
/** Show progress e.g. for verifychain */
boost::signals2::signal<void (const std::string &title, int nProgress)> ShowProgress;
/** Set progress break action (possible "cancel button" triggers that action) */
boost::signals2::signal<void (std::function<void(void)> action)> SetProgressBreakAction;
/**
* Show progress e.g. for verifychain.
* resume_possible indicates shutting down now will result in the current progress action resuming upon restart.
*/
boost::signals2::signal<void (const std::string &title, int nProgress, bool resume_possible)> ShowProgress;
/** New block has been accepted */
boost::signals2::signal<void (bool, const CBlockIndex *)> NotifyBlockTip;