mirror of
https://github.com/monero-project/monero.git
synced 2024-12-15 04:46:31 +02:00
unit_tests: initialize db object in ctor, not open
open isn't actually called in those tests
This commit is contained in:
parent
955ad41a2d
commit
a8caab1af1
@ -42,10 +42,11 @@ using namespace cryptonote;
|
|||||||
|
|
||||||
class TestDB: public BlockchainDB {
|
class TestDB: public BlockchainDB {
|
||||||
public:
|
public:
|
||||||
virtual void open(const std::string& filename, const int db_flags = 0) {
|
TestDB() {
|
||||||
for (size_t n = 0; n < 256; ++n)
|
for (size_t n = 0; n < 256; ++n)
|
||||||
starting_height[n] = std::numeric_limits<uint64_t>::max();
|
starting_height[n] = std::numeric_limits<uint64_t>::max();
|
||||||
}
|
}
|
||||||
|
virtual void open(const std::string& filename, const int db_flags = 0) { }
|
||||||
virtual void close() {}
|
virtual void close() {}
|
||||||
virtual void sync() {}
|
virtual void sync() {}
|
||||||
virtual void reset() {}
|
virtual void reset() {}
|
||||||
|
Loading…
Reference in New Issue
Block a user