aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_core.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-11-14 21:35:03 +0200
committerRiccardo Spagni <ric@spagni.net>2018-11-14 21:35:03 +0200
commit0cc3fc3756390f057847b767a4d7e8e3745242df (patch)
tree1cc64ac2883d99bd97c6a7f08f1540be68bb891f /src/cryptonote_core/cryptonote_core.cpp
parent33ad6fb4c115cfa1681b493a6a17f4fbe2d1ae56 (diff)
parent5808530f54d2f24410b24089f6d30163aed71d7b (diff)
downloadmonzero-core-0cc3fc3756390f057847b767a4d7e8e3745242df.tar.gz
monzero-core-0cc3fc3756390f057847b767a4d7e8e3745242df.tar.xz
monzero-core-0cc3fc3756390f057847b767a4d7e8e3745242df.zip
Merge pull request #4769
5808530f blockchain: remove unused output_scan_worker parameter (moneromooo-monero) 1426209a blockchain: don't run threads if we have just one function to run (moneromooo-monero) 6f7a5fd4 db_lmdb: slight speedup getting array data from the blockchain (moneromooo-monero) 99fbe100 db_lmdb: save some string copies for readonly db keys/values (moneromooo-monero) bf31447e tx_pool: speed up take_tx for transactions from blocks (moneromooo-monero) 4f005a77 tx_pool: remove unnecessary get_transaction_hash (moneromooo-monero) 593ef598 perf_timer: call reserve on new timer array (moneromooo-monero) 6ecc99ad core: avoid unnecessary tx/blob conversions (moneromooo-monero) 00cc1a16 unit_tests: notify test special case for the usual weirdo (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index c405c996a..10ab3fe65 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -909,7 +909,7 @@ namespace cryptonote
}
const size_t weight = get_transaction_weight(results[i].tx, it->size());
- ok &= add_new_tx(results[i].tx, results[i].hash, results[i].prefix_hash, weight, tvc[i], keeped_by_block, relayed, do_not_relay);
+ ok &= add_new_tx(results[i].tx, results[i].hash, tx_blobs[i], results[i].prefix_hash, weight, tvc[i], keeped_by_block, relayed, do_not_relay);
if(tvc[i].m_verifivation_failed)
{MERROR_VER("Transaction verification failed: " << results[i].hash);}
else if(tvc[i].m_verifivation_impossible)
@@ -1127,7 +1127,7 @@ namespace cryptonote
blobdata bl;
t_serializable_object_to_blob(tx, bl);
size_t tx_weight = get_transaction_weight(tx, bl.size());
- return add_new_tx(tx, tx_hash, tx_prefix_hash, tx_weight, tvc, keeped_by_block, relayed, do_not_relay);
+ return add_new_tx(tx, tx_hash, bl, tx_prefix_hash, tx_weight, tvc, keeped_by_block, relayed, do_not_relay);
}
//-----------------------------------------------------------------------------------------------
size_t core::get_blockchain_total_transactions() const
@@ -1135,7 +1135,7 @@ namespace cryptonote
return m_blockchain_storage.get_total_transactions();
}
//-----------------------------------------------------------------------------------------------
- bool core::add_new_tx(transaction& tx, const crypto::hash& tx_hash, const crypto::hash& tx_prefix_hash, size_t tx_weight, tx_verification_context& tvc, bool keeped_by_block, bool relayed, bool do_not_relay)
+ bool core::add_new_tx(transaction& tx, const crypto::hash& tx_hash, const cryptonote::blobdata &blob, const crypto::hash& tx_prefix_hash, size_t tx_weight, tx_verification_context& tvc, bool keeped_by_block, bool relayed, bool do_not_relay)
{
if (keeped_by_block)
get_blockchain_storage().on_new_tx_from_block(tx);
@@ -1153,7 +1153,7 @@ namespace cryptonote
}
uint8_t version = m_blockchain_storage.get_current_hard_fork_version();
- return m_mempool.add_tx(tx, tx_hash, tx_weight, tvc, keeped_by_block, relayed, do_not_relay, version);
+ return m_mempool.add_tx(tx, tx_hash, blob, tx_weight, tvc, keeped_by_block, relayed, do_not_relay, version);
}
//-----------------------------------------------------------------------------------------------
bool core::relay_txpool_transactions()