Page MenuHomePhabricator

wallet: Reset chain notifications handler if AttachChain fails
AcceptedPublic

Authored by Fabien on Wed, Apr 23, 15:25.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Summary
AttachChain will create the chain notifications handler which contains a
reference to the wallet's shared_ptr. If AttachChain fails, the wallet
needs to be unloaded, and this is expected to happen with its custom
deleter ReleaseWallet. However, if the chain notifications handler is
still set, then the shared_ptr is still referenced by something, so the
wallet is never actually released.

Backport of core#29243.

Depends on D17981.

This fixes the ASAN failure from the wallet_assumeutxo functional test.

Test Plan
ninja all check-all