Skip to content

unsubscribe when locking wallet

Luke Champine requested to merge wallet-lock into master

This fixes a bug where locking the wallet caused the wallet to miss blocks.

This also seems like a good place to discuss the wallet memory usage. Using a global bolt tx speeds up IBD and rescans, but causes transaction data to build up in memory. A shorter commit interval alleviates this somewhat. In my testing, committing the transaction pool (which uses the same db model) once per second caused a peak of 100MB RAM usage, while committing after each block reduced that to 4MB. Committing after each block is prohibitively slow, but if fsync is disabled on the db it runs slightly faster than committing once per second. I suggest that we explore disabling fsync during IBD and rescans. It seems like fsync can be enabled and disabled at will during execution, i.e. we don't need to close and reopen the database.

Merge request reports