diff options
| author | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-14 12:59:03 -0300 |
|---|---|---|
| committer | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-14 13:06:57 -0300 |
| commit | 82c3e10da01260650ddd2944e3f895ccf2c07ffc (patch) | |
| tree | 760244d73f0a4e41449cb7c9da249d2bd4d45dfa /src/db.h | |
| parent | 5b635e570ec38a8b621f19f93a4125f875e3f152 (diff) | |
db: recreate Berkeley DB environment after shutdown
Diffstat (limited to 'src/db.h')
| -rw-r--r-- | src/db.h | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -48,7 +48,7 @@ public: | |||
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | 50 | ||
| 51 | extern DbEnv dbenv; | 51 | extern DbEnv& GetDbEnv(); |
| 52 | extern void DBFlush(bool fShutdown); | 52 | extern void DBFlush(bool fShutdown); |
| 53 | // Close the environment and delete its logs. Only the encryption command calls | 53 | // Close the environment and delete its logs. Only the encryption command calls |
| 54 | // this: the logs hold the plaintext records the old wallet wrote. | 54 | // this: the logs hold the plaintext records the old wallet wrote. |
| @@ -237,7 +237,7 @@ public: | |||
| 237 | if (!pdb) | 237 | if (!pdb) |
| 238 | return false; | 238 | return false; |
| 239 | DbTxn* ptxn = NULL; | 239 | DbTxn* ptxn = NULL; |
| 240 | int ret = dbenv.txn_begin(GetTxn(), &ptxn, 0); | 240 | int ret = GetDbEnv().txn_begin(GetTxn(), &ptxn, 0); |
| 241 | if (!ptxn || ret != 0) | 241 | if (!ptxn || ret != 0) |
| 242 | return false; | 242 | return false; |
| 243 | vTxn.push_back(ptxn); | 243 | vTxn.push_back(ptxn); |