mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Make GenTxid boolean constructor private
This commit is contained in:
parent
faeb9a5753
commit
fa4ec1c0bd
7 changed files with 13 additions and 12 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue