diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index 10a06e4b9..adf694428 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -169,6 +169,7 @@ bool BerkeleyEnvironment::Open(bool retry) S_IRUSR | S_IWUSR); if (ret != 0) { dbenv->close(0); + Reset(); LogPrintf("BerkeleyEnvironment::Open: Error %d opening database environment: %s\n", ret, DbEnv::strerror(ret)); if (retry) { // try moving the database env out of the way