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

@ -634,6 +634,9 @@ namespace cryptonote
int t_cryptonote_protocol_handler<t_core>::handle_request_fluffy_missing_tx(int command, NOTIFY_REQUEST_FLUFFY_MISSING_TX::request& arg, cryptonote_connection_context& context)
{
MLOG_P2P_MESSAGE("Received NOTIFY_REQUEST_FLUFFY_MISSING_TX (" << arg.missing_tx_indices.size() << " txes), block hash " << arg.block_hash);
std::list<std::pair<cryptonote::blobdata, block>> local_blocks;
std::list<cryptonote::blobdata> local_txs;
block b;
if (!m_core.get_block_by_hash(arg.block_hash, b))