Moved openDB from the Wallet-TX loop