> The wallet is async, so after generating a block, we must call syncwithvalidationinterfacequeue. Otherwise the timestamp will be of the previous block.
> getbestblockhash directly accesses the chainstate, so it is not needed there.
This is a backport of Core [[https://github.com/bitcoin/bitcoin/pull/18753 | PR18753]]