Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixes #1762 segfault when miner is interrupted. #1778
Performed testing of this PR on mainnet by running zcashd in gdb with and without the patch, using zcash-cli to enable and disable the miner, and then wait for a new block to arrive and either crash (without patch) or continue as normal (with patch).
Running ./zcash-cli setgenerate false would result in a segfault. The miner thread's boost::signals2::connection was not disconnected when the miner thread was interrupted and shutdown. Subsequently, when a new block arrived, the UpdateTip callback would still be invoked on a now invalid object, resulting in a segfault.