upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/db.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.cpp')
-rw-r--r--src/db.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/db.cpp b/src/db.cpp
index 7763af8..d482c5a 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -834,6 +834,15 @@ bool BackupWallet(const string& strDest)
834 { return error("BackupWallet() : %s\n", e.what()); } 834 { return error("BackupWallet() : %s\n", e.what()); }
835 } 835 }
836 836
837 // Recorded here rather than by whoever called, so that a backup taken with
838 // /backupwallet counts as much as one taken from the GUI. When the GUI
839 // wrote this itself, anyone following the README -- which documents the
840 // command line first -- was told forever that they had never backed up.
841 // Outside the cs_db block above: this opens the wallet for writing, and
842 // there is no reason to do that while holding the database lock.
843 try { CWalletDB().WriteSetting("nLastWalletBackup", (int64)GetTime()); }
844 catch (...) { } // the backup is written; failing to note it is not fatal
845
837 printf("BackupWallet() : wrote %s\n", strDest.c_str()); 846 printf("BackupWallet() : wrote %s\n", strDest.c_str());
838 return true; 847 return true;
839} 848}