This is a follow-up for #19077
This PR simplifies DB interface by removing mode string from WalletDatabase
and WalletBatch
.
The mode string was used to determine two flags for the instantiation of db connection:
- read-only flag. Never used on connection level. And on batch level Is only used within
BerkeleyDatabase::Rewrite
where it’s replaced with bool flag. - create flag. Is not required as we always check
require_existing
&require_create
flags inMakeDatabase()
before creating actual database instance. So we can safely default to always creating database if it doesn’t exist yet.