https://github.com/bitcoin/bitcoin/pull/16033/commits/593a8e8a2ce177c41a7809479c0086ae0fee4b4e wallet: Use chain.lock() instead of temporary chain.assumeLocked()
https://github.com/bitcoin/bitcoin/pull/16033/commits/9402ef0739fdcd8e989c07c0595095e9608b243c Remove temporary method assumeLocked(). Remove LockingStateImpl. Remove redundant cs_main locks.
---
This is a backport of Core PR16033