A WalletDatabase whose contents and return values can be modified as needed for testing.
More...
#include <util.h>
|
| MockableData | m_records |
| bool | m_pass {true} |
| std::atomic< int > | m_refcount {0} |
| | Counts the number of active database users to be sure that the database is not closed while someone is using it.
|
A WalletDatabase whose contents and return values can be modified as needed for testing.
Definition at line 98 of file util.h.
◆ MockableDatabase()
| wallet::MockableDatabase::MockableDatabase |
( |
MockableData | records = {} | ) |
|
|
inline |
◆ ~MockableDatabase()
| wallet::MockableDatabase::~MockableDatabase |
( |
| ) |
|
|
default |
◆ 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 111 of file util.h.
◆ Filename()
| std::string wallet::MockableDatabase::Filename |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Files()
| std::vector< fs::path > wallet::MockableDatabase::Files |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Format()
| std::string wallet::MockableDatabase::Format |
( |
| ) |
|
|
inlineoverridevirtual |
◆ MakeBatch()
| std::unique_ptr< DatabaseBatch > wallet::MockableDatabase::MakeBatch |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Open()
| void wallet::MockableDatabase::Open |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Rewrite()
| bool wallet::MockableDatabase::Rewrite |
( |
| ) |
|
|
inlineoverridevirtual |
◆ m_pass
| bool wallet::MockableDatabase::m_pass {true} |
◆ m_records
The documentation for this class was generated from the following file: