blockchain_db: add "raw" blobdata getters for block and transaction

This speeds up operations such as serving blocks to syncing peers
This commit is contained in:
moneromooo-monero 2017-01-15 16:05:55 +00:00
parent 3f171b931f
commit 0288310e3b
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
13 changed files with 230 additions and 87 deletions

View file

@ -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; }
};