upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/db.h
diff options
context:
space:
mode:
authorNsable-sh <nsable-sh@noreply.git.bitflash.network>2026-08-14 12:59:03 -0300
committerNsable-sh <nsable-sh@noreply.git.bitflash.network>2026-08-14 13:06:57 -0300
commit82c3e10da01260650ddd2944e3f895ccf2c07ffc (patch)
tree760244d73f0a4e41449cb7c9da249d2bd4d45dfa /src/db.h
parent5b635e570ec38a8b621f19f93a4125f875e3f152 (diff)
db: recreate Berkeley DB environment after shutdown
Diffstat (limited to 'src/db.h')
-rw-r--r--src/db.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db.h b/src/db.h
index 2816957..53bda59 100644
--- a/src/db.h
+++ b/src/db.h
@@ -48,7 +48,7 @@ public:
48}; 48};
49 49
50 50
51extern DbEnv dbenv; 51extern DbEnv& GetDbEnv();
52extern void DBFlush(bool fShutdown); 52extern 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);