HomePhabricator

Log env path in BerkeleyEnvironment::Flush

Description

Log env path in BerkeleyEnvironment::Flush

Summary:
With bitcoind -regtest -wallet=w1 -wallet=w2 -debug, before:

BerkeleyEnvironment::Flush: Flush(true)
BerkeleyEnvironment::Flush: Flushing wallet.dat (refcount = 0)...
BerkeleyEnvironment::Flush: wallet.dat checkpoint
BerkeleyEnvironment::Flush: wallet.dat detach
BerkeleyEnvironment::Flush: wallet.dat closed
BerkeleyEnvironment::Flush: Flush(true) took              23ms
BerkeleyEnvironment::Flush: Flush(true)
BerkeleyEnvironment::Flush: Flushing wallet.dat (refcount = 0)...
BerkeleyEnvironment::Flush: wallet.dat checkpoint
BerkeleyEnvironment::Flush: wallet.dat detach
BerkeleyEnvironment::Flush: wallet.dat closed
BerkeleyEnvironment::Flush: Flush(true) took              19ms

After:

BerkeleyEnvironment::Flush: [/Users/joao/Library/Application
Support/Bitcoin/regtest/wallets/w1] Flush(true)
BerkeleyEnvironment::Flush: Flushing wallet.dat (refcount = 0)...
BerkeleyEnvironment::Flush: wallet.dat checkpoint
BerkeleyEnvironment::Flush: wallet.dat detach
BerkeleyEnvironment::Flush: wallet.dat closed
BerkeleyEnvironment::Flush: Flush(true) took              23ms
BerkeleyEnvironment::Flush: [/Users/joao/Library/Application
Support/Bitcoin/regtest/wallets/w2] Flush(true)
BerkeleyEnvironment::Flush: Flushing wallet.dat (refcount = 0)...
BerkeleyEnvironment::Flush: wallet.dat checkpoint
BerkeleyEnvironment::Flush: wallet.dat detach
BerkeleyEnvironment::Flush: wallet.dat closed
BerkeleyEnvironment::Flush: Flush(true) took              19ms

Backport of core PR14760:
https://github.com/bitcoin/bitcoin/pull/14760/files

Depends on D4885.

Test Plan:

ninja

Launch bitcoind, kill it, and check the output is compliant with the
diff
summary.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D4887

Details

Provenance
João Barbosa <joao.paulo.barbosa@gmail.com>Authored on Nov 19 2018, 15:56
FabienCommitted on Jan 10 2020, 21:09
FabienPushed on Jan 10 2020, 21:09
Reviewer
Restricted Project
Differential Revision
D4887: Log env path in BerkeleyEnvironment::Flush
Parents
rABCbc0f71782091: wallet: detecting duplicate wallet by comparing the db filename.
Branches
Unknown
Tags
Unknown