Instead of calling getHeight, we rely on CWallet::m_last_block
processed_height where it's possible.
Backport of Core [[https://github.com/bitcoin/bitcoin/pull/16426 | PR16426]] part [1/5] : https://github.com/bitcoin/bitcoin/pull/16426/commits/b855592d835bf4b3fb1263b88d4f96669a1722b1