Bitcoin 0.17 now allows us to unload (and re-load) wallets. This clashed
with the CWalletExtension::ManagePendingSlashings, which was scheduled
to run periodically every 10 seconds, and which tried to access the
wallet, even though it could be unloaded by that moment.
This commit saves a reference to the wallet during the execution of the
task, to avoid a segfault. Further, it introduces a new type of benign
exception, task_unscheduled, which interrupts the execution of the
current task and does not reschedule it.
Bitcoin 0.17 now allows us to unload (and re-load) wallets. This clashed with the
CWalletExtension::ManagePendingSlashings
, which was scheduled to run periodically every 10 seconds, and which tried to access the wallet, even though it could be unloaded by that moment.This commit saves a reference to the wallet during the execution of the task, to avoid a segfault. Further, it introduces a new type of benign exception,
task_unscheduled
, which interrupts the execution of the current task and does not reschedule it.