aboutsummaryrefslogtreecommitdiff
path: root/src/test/txrequest_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/txrequest_tests.cpp')
-rw-r--r--src/test/txrequest_tests.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/txrequest_tests.cpp b/src/test/txrequest_tests.cpp
index a4ed1e8b3a..dc257a0d51 100644
--- a/src/test/txrequest_tests.cpp
+++ b/src/test/txrequest_tests.cpp
@@ -6,6 +6,7 @@
#include <txrequest.h>
#include <uint256.h>
+#include <test/util/random.h>
#include <test/util/setup_common.h>
#include <algorithm>
@@ -385,6 +386,7 @@ void BuildBigPriorityTest(Scenario& scenario, int peers)
}
// Make a list of all peers, in order of intended request order (concatenation of pref_peers and npref_peers).
std::vector<NodeId> request_order;
+ request_order.reserve(num_pref + num_npref);
for (int i = 0; i < num_pref; ++i) request_order.push_back(pref_peers[i]);
for (int i = 0; i < num_npref; ++i) request_order.push_back(npref_peers[i]);