aboutsummaryrefslogtreecommitdiff
path: root/src/test/txrequest_tests.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-10-22 12:28:14 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-10-22 12:32:16 +0200
commitfa4ec1c0bdaef9f082a6661d7faf16149774e145 (patch)
treea147b36362e1e1e422d45f9f1083edbcf5b671d3 /src/test/txrequest_tests.cpp
parentfaeb9a575367119dbff60c35fa2c13547718e179 (diff)
downloadbitcoin-fa4ec1c0bdaef9f082a6661d7faf16149774e145.tar.xz
Make GenTxid boolean constructor private
Diffstat (limited to 'src/test/txrequest_tests.cpp')
-rw-r--r--src/test/txrequest_tests.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/txrequest_tests.cpp b/src/test/txrequest_tests.cpp
index 1d137b03b1..99d41882c9 100644
--- a/src/test/txrequest_tests.cpp
+++ b/src/test/txrequest_tests.cpp
@@ -221,7 +221,7 @@ public:
/** Generate a random GenTxid; the txhash follows NewTxHash; the is_wtxid flag is random. */
GenTxid NewGTxid(const std::vector<std::vector<NodeId>>& orders = {})
{
- return {InsecureRandBool(), NewTxHash(orders)};
+ return InsecureRandBool() ? GenTxid::Wtxid(NewTxHash(orders)) : GenTxid::Txid(NewTxHash(orders));
}
/** Generate a new random NodeId to use as peer. The same NodeId is never returned twice
@@ -494,8 +494,8 @@ void BuildWtxidTest(Scenario& scenario, int config)
auto peerT = scenario.NewPeer();
auto peerW = scenario.NewPeer();
auto txhash = scenario.NewTxHash();
- GenTxid txid{false, txhash};
- GenTxid wtxid{true, txhash};
+ auto txid{GenTxid::Txid(txhash)};
+ auto wtxid{GenTxid::Wtxid(txhash)};
auto reqtimeT = InsecureRandBool() ? MIN_TIME : scenario.Now() + RandomTime8s();
auto reqtimeW = InsecureRandBool() ? MIN_TIME : scenario.Now() + RandomTime8s();