A WalletDatabase whose contents and return values can be modified as needed for testing.
More...
#include <util.h>
A WalletDatabase whose contents and return values can be modified as needed for testing.
Definition at line 100 of file util.h.
◆ MockableDatabase()
wallet::MockableDatabase::MockableDatabase |
( |
MockableData |
records = {} | ) |
|
|
inline |
◆ ~MockableDatabase()
wallet::MockableDatabase::~MockableDatabase |
( |
| ) |
|
|
inline |
◆ AddRef()
void wallet::MockableDatabase::AddRef |
( |
| ) |
|
|
inlineoverridevirtual |
Indicate the a new database user has began using the database.
Increments m_refcount
Implements wallet::WalletDatabase.
Definition at line 110 of file util.h.
◆ Backup()
bool wallet::MockableDatabase::Backup |
( |
const std::string & |
strDest | ) |
const |
|
inlineoverridevirtual |
◆ Close()
void wallet::MockableDatabase::Close |
( |
| ) |
|
|
inlineoverridevirtual |
Flush to the database file and close the database.
Also close the environment if no other databases are open in it.
Implements wallet::WalletDatabase.
Definition at line 116 of file util.h.
◆ Filename()
std::string wallet::MockableDatabase::Filename |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Flush()
void wallet::MockableDatabase::Flush |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Format()
std::string wallet::MockableDatabase::Format |
( |
| ) |
|
|
inlineoverridevirtual |
◆ IncrementUpdateCounter()
void wallet::MockableDatabase::IncrementUpdateCounter |
( |
| ) |
|
|
inlineoverridevirtual |
◆ MakeBatch()
std::unique_ptr<DatabaseBatch> wallet::MockableDatabase::MakeBatch |
( |
bool |
flush_on_close = true | ) |
|
|
inlineoverridevirtual |
◆ Open()
void wallet::MockableDatabase::Open |
( |
| ) |
|
|
inlineoverridevirtual |
◆ PeriodicFlush()
bool wallet::MockableDatabase::PeriodicFlush |
( |
| ) |
|
|
inlineoverridevirtual |
◆ ReloadDbEnv()
void wallet::MockableDatabase::ReloadDbEnv |
( |
| ) |
|
|
inlineoverridevirtual |
◆ RemoveRef()
void wallet::MockableDatabase::RemoveRef |
( |
| ) |
|
|
inlineoverridevirtual |
Indicate that database user has stopped using the database and that it could be flushed or closed.
Decrement m_refcount
Implements wallet::WalletDatabase.
Definition at line 111 of file util.h.
◆ Rewrite()
bool wallet::MockableDatabase::Rewrite |
( |
const char * |
pszSkip = nullptr | ) |
|
|
inlineoverridevirtual |
Rewrite the entire database on disk, with the exception of key pszSkip if non-zero.
Implements wallet::WalletDatabase.
Definition at line 113 of file util.h.
◆ m_pass
bool wallet::MockableDatabase::m_pass {true} |
◆ m_records
The documentation for this class was generated from the following file: