aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-02-21 11:27:15 +0200
committerRiccardo Spagni <ric@spagni.net>2017-02-21 11:27:15 +0200
commit49efd3add9f7b9bbcbd2526538846f6d8e58ac86 (patch)
treee3f1c97cd7dfb7a1c82927f3c2d483bfbe1afbe2 /tests
parentMerge pull request #1725 (diff)
parentblockchain_db: add "raw" blobdata getters for block and transaction (diff)
downloadmonero-49efd3add9f7b9bbcbd2526538846f6d8e58ac86.tar.xz
Merge pull request #1727
0288310e blockchain_db: add "raw" blobdata getters for block and transaction (moneromooo-monero)
Diffstat (limited to 'tests')
-rw-r--r--tests/core_proxy/core_proxy.h2
-rw-r--r--tests/unit_tests/ban.cpp2
-rw-r--r--tests/unit_tests/hardfork.cpp4
3 files changed, 5 insertions, 3 deletions
diff --git a/tests/core_proxy/core_proxy.h b/tests/core_proxy/core_proxy.h
index 09e16c4cc..d362f09b8 100644
--- a/tests/core_proxy/core_proxy.h
+++ b/tests/core_proxy/core_proxy.h
@@ -91,7 +91,7 @@ namespace tests
virtual void on_transaction_relayed(const cryptonote::blobdata& tx) {}
bool get_testnet() const { return false; }
bool get_pool_transaction(const crypto::hash& id, cryptonote::transaction& tx) const { return false; }
- bool get_blocks(uint64_t start_offset, size_t count, std::list<cryptonote::block>& blocks, std::list<cryptonote::transaction>& txs) const { return false; }
+ bool get_blocks(uint64_t start_offset, size_t count, std::list<std::pair<cryptonote::blobdata, cryptonote::block>>& blocks, std::list<cryptonote::blobdata>& txs) const { return false; }
bool get_transactions(const std::vector<crypto::hash>& txs_ids, std::list<cryptonote::transaction>& txs, std::list<crypto::hash>& missed_txs) const { return false; }
bool get_block_by_hash(const crypto::hash &h, cryptonote::block &blk, bool *orphan = NULL) const { return false; }
};
diff --git a/tests/unit_tests/ban.cpp b/tests/unit_tests/ban.cpp
index 88bbf7eec..f859c6f10 100644
--- a/tests/unit_tests/ban.cpp
+++ b/tests/unit_tests/ban.cpp
@@ -66,7 +66,7 @@ public:
virtual void on_transaction_relayed(const cryptonote::blobdata& tx) {}
bool get_testnet() const { return false; }
bool get_pool_transaction(const crypto::hash& id, cryptonote::transaction& tx) const { return false; }
- bool get_blocks(uint64_t start_offset, size_t count, std::list<cryptonote::block>& blocks, std::list<cryptonote::transaction>& txs) const { return false; }
+ bool get_blocks(uint64_t start_offset, size_t count, std::list<std::pair<cryptonote::blobdata, cryptonote::block>>& blocks, std::list<cryptonote::blobdata>& txs) const { return false; }
bool get_transactions(const std::vector<crypto::hash>& txs_ids, std::list<cryptonote::transaction>& txs, std::list<crypto::hash>& missed_txs) const { return false; }
bool get_block_by_hash(const crypto::hash &h, cryptonote::block &blk, bool *orphan = NULL) const { return false; }
};
diff --git a/tests/unit_tests/hardfork.cpp b/tests/unit_tests/hardfork.cpp
index 81cf32c8b..7ca5ad09d 100644
--- a/tests/unit_tests/hardfork.cpp
+++ b/tests/unit_tests/hardfork.cpp
@@ -59,7 +59,9 @@ public:
virtual void block_txn_abort() {}
virtual void drop_hard_fork_info() {}
virtual bool block_exists(const crypto::hash& h, uint64_t *height) const { return false; }
- virtual block get_block(const crypto::hash& h) const { return block(); }
+ virtual blobdata get_block_blob_from_height(const uint64_t& height) const { return blobdata(); }
+ virtual blobdata get_block_blob(const crypto::hash& h) const { return blobdata(); }
+ virtual bool get_tx_blob(const crypto::hash& h, cryptonote::blobdata &tx) const { return false; }
virtual uint64_t get_block_height(const crypto::hash& h) const { return 0; }
virtual block_header get_block_header(const crypto::hash& h) const { return block_header(); }
virtual uint64_t get_block_timestamp(const uint64_t& height) const { return 0; }