MCPcopy Create free account
hub / github.com/ElementsProject/elements / NewGTxid

Method NewGTxid

src/test/txrequest_tests.cpp:222–225  ·  view source on GitHub ↗

Generate a random GenTxid; the txhash follows NewTxHash; the is_wtxid flag is random. */

Source from the content-addressed store, hash-verified

220
221 /** Generate a random GenTxid; the txhash follows NewTxHash; the is_wtxid flag is random. */
222 GenTxid NewGTxid(const std::vector<std::vector<NodeId>>& orders = {})
223 {
224 return InsecureRandBool() ? GenTxid::Wtxid(NewTxHash(orders)) : GenTxid::Txid(NewTxHash(orders));
225 }
226
227 /** Generate a new random NodeId to use as peer. The same NodeId is never returned twice
228 * (across all Scenarios combined). */

Callers 6

BuildSingleTestFunction · 0.80
BuildPriorityTestFunction · 0.80
BuildBigPriorityTestFunction · 0.80
BuildRequestOrderTestFunction · 0.80
BuildTimeBackwardsTestFunction · 0.80
BuildWeirdRequestsTestFunction · 0.80

Calls 1

InsecureRandBoolFunction · 0.85

Tested by

no test coverage detected