mirror of
https://github.com/monero-project/monero.git
synced 2025-08-11 13:20:14 -04:00
replace std::list with std::vector on some hot paths
also use reserve where appropriate
This commit is contained in:
parent
209ec963b5
commit
ed2c81ed95
28 changed files with 257 additions and 233 deletions
|
@ -109,7 +109,7 @@ namespace cryptonote
|
|||
struct block_complete_entry
|
||||
{
|
||||
blobdata block;
|
||||
std::list<blobdata> txs;
|
||||
std::vector<blobdata> txs;
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(block)
|
||||
KV_SERIALIZE(txs)
|
||||
|
@ -145,7 +145,7 @@ namespace cryptonote
|
|||
|
||||
struct request
|
||||
{
|
||||
std::list<blobdata> txs;
|
||||
std::vector<blobdata> txs;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(txs)
|
||||
|
@ -161,8 +161,8 @@ namespace cryptonote
|
|||
|
||||
struct request
|
||||
{
|
||||
std::list<crypto::hash> txs;
|
||||
std::list<crypto::hash> blocks;
|
||||
std::vector<crypto::hash> txs;
|
||||
std::vector<crypto::hash> blocks;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE_CONTAINER_POD_AS_BLOB(txs)
|
||||
|
@ -177,9 +177,9 @@ namespace cryptonote
|
|||
|
||||
struct request
|
||||
{
|
||||
std::list<blobdata> txs;
|
||||
std::list<block_complete_entry> blocks;
|
||||
std::list<crypto::hash> missed_ids;
|
||||
std::vector<blobdata> txs;
|
||||
std::vector<block_complete_entry> blocks;
|
||||
std::vector<crypto::hash> missed_ids;
|
||||
uint64_t current_blockchain_height;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
|
@ -230,7 +230,7 @@ namespace cryptonote
|
|||
uint64_t start_height;
|
||||
uint64_t total_height;
|
||||
uint64_t cumulative_difficulty;
|
||||
std::list<crypto::hash> m_block_ids;
|
||||
std::vector<crypto::hash> m_block_ids;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(start_height)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue