diff --git a/db/src/indexed_block.rs b/db/src/indexed_block.rs index 139e0c4f..94ad9a4b 100644 --- a/db/src/indexed_block.rs +++ b/db/src/indexed_block.rs @@ -34,8 +34,8 @@ impl IndexedBlock { let mut block = IndexedBlock { header_hash: header.hash(), header: header, - transactions: Vec::new(), - transaction_hashes: Vec::new(), + transactions: Vec::with_capacity(transaction_index.len()), + transaction_hashes: Vec::with_capacity(transaction_index.len()), }; for (h256, tx) in transaction_index {