diff options
author | luigi1111 <luigi1111w@gmail.com> | 2020-11-25 09:14:26 -0600 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2020-11-25 09:14:26 -0600 |
commit | e4c0cb0ff3ed5830b3da67c3a039e42f9c05eeeb (patch) | |
tree | bf18f2910c7bdecf1802f82aaf1581ab26f6b587 /tests | |
parent | Merge pull request #7040 (diff) | |
parent | cryptonote_core: dandelion - use local height or median height if syncing (diff) | |
download | monero-e4c0cb0ff3ed5830b3da67c3a039e42f9c05eeeb.tar.xz |
Merge pull request #7039
9d7f473 cryptonote_core: dandelion - use local height or median height if syncing (xiphon)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core_proxy/core_proxy.h | 3 | ||||
-rw-r--r-- | tests/unit_tests/levin.cpp | 7 | ||||
-rw-r--r-- | tests/unit_tests/node_server.cpp | 3 |
3 files changed, 10 insertions, 3 deletions
diff --git a/tests/core_proxy/core_proxy.h b/tests/core_proxy/core_proxy.h index 4a41b5002..ecfcc18ae 100644 --- a/tests/core_proxy/core_proxy.h +++ b/tests/core_proxy/core_proxy.h @@ -66,9 +66,10 @@ namespace tests public: + virtual bool is_synchronized() const final { return true; } void on_synchronized(){} void safesyncmode(const bool){} - uint64_t get_current_blockchain_height(){return 1;} + virtual uint64_t get_current_blockchain_height() const final {return 1;} void set_target_blockchain_height(uint64_t) {} bool init(const boost::program_options::variables_map& vm); bool deinit(){return true;} diff --git a/tests/unit_tests/levin.cpp b/tests/unit_tests/levin.cpp index 128d51fb3..22638942d 100644 --- a/tests/unit_tests/levin.cpp +++ b/tests/unit_tests/levin.cpp @@ -120,7 +120,12 @@ namespace { std::map<cryptonote::relay_method, std::vector<cryptonote::blobdata>> relayed_; - uint64_t get_target_blockchain_height() const override + virtual bool is_synchronized() const final + { + return false; + } + + virtual uint64_t get_current_blockchain_height() const final { return 0; } diff --git a/tests/unit_tests/node_server.cpp b/tests/unit_tests/node_server.cpp index 588e91d02..0191e5aa4 100644 --- a/tests/unit_tests/node_server.cpp +++ b/tests/unit_tests/node_server.cpp @@ -47,9 +47,10 @@ namespace cryptonote { class test_core : public cryptonote::i_core_events { public: + virtual bool is_synchronized() const final { return true; } void on_synchronized(){} void safesyncmode(const bool){} - uint64_t get_current_blockchain_height() const {return 1;} + virtual uint64_t get_current_blockchain_height() const final {return 1;} void set_target_blockchain_height(uint64_t) {} bool init(const boost::program_options::variables_map& vm) {return true ;} bool deinit(){return true;} |