This PR closes db.log
and removes .walletlock
files when BerkeleyEnvironment
is closed.
Fixes #15291 (comment).
This PR closes db.log
and removes .walletlock
files when BerkeleyEnvironment
is closed.
Fixes #15291 (comment).
125@@ -126,6 +126,10 @@ void BerkeleyEnvironment::Close()
126 }
127 }
128
129+ FILE* error_file = nullptr;
130+ dbenv->get_errfile(&error_file);
131+ if (error_file) fclose(error_file);
dbenv->close(0)
.
The error file db.log is opened by BerkeleyEnvironment instance and
should be closed after dbenv is closed.
Close .walletlock file when a BerkeleyEnvironment is deleted.
utACK d3bf3b9
master (fc21bb4):
0src/qt/bitcoin-qt
1
2lsof -p 56700 | grep wallet
3bitcoin-q 56700 michael 24u REG 1,4 0 4556196 /Users/michael/Library/Application Support/Bitcoin/wallets/.walletlock
4bitcoin-q 56700 michael 25w REG 1,4 0 4556198 /Users/michael/Library/Application Support/Bitcoin/wallets/db.log
5bitcoin-q 56700 michael 33u REG 1,4 1048576 26847564 /Users/michael/Library/Application Support/Bitcoin/wallets/database/log.0000000001
6bitcoin-q 56700 michael 39w REG 1,4 0 4556198 /Users/michael/Library/Application Support/Bitcoin/wallets/db.log
7
8src/bitcoin-cli unloadwallet ""
9
10lsof -p 56700 | grep wallet
11bitcoin-q 56700 michael 24u REG 1,4 0 4556196 /Users/michael/Library/Application Support/Bitcoin/wallets/.walletlock
12bitcoin-q 56700 michael 25w REG 1,4 0 4556198 /Users/michael/Library/Application Support/Bitcoin/wallets/db.log
13bitcoin-q 56700 michael 39w REG 1,4 0 4556198 /Users/michael/Library/Application Support/Bitcoin/wallets/db.log
This PR:
0src/qt/bitcoin-qt
1
2lsof -p 54793 | grep wallet
3bitcoin-q 54793 michael 36u REG 1,4 0 4556196 /Users/michael/Library/Application Support/Bitcoin/wallets/.walletlock
4bitcoin-q 54793 michael 37w REG 1,4 0 4556198 /Users/michael/Library/Application Support/Bitcoin/wallets/db.log
5bitcoin-q 54793 michael 38u REG 1,4 1048576 26847564 /Users/michael/Library/Application Support/Bitcoin/wallets/database/log.0000000001
6
7src/bitcoin-cli unloadwallet ""
8
9lsof -p 54793 | grep wallet
promag
gmaxwell
MarcoFalke
practicalswift
ryanofsky
laanwj
fanquake
meshcollider
Labels
Wallet
Milestone
0.17.2