mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
random: get rid of GetRand by inlining
This commit is contained in:
parent
e2d1f84858
commit
ddc184d999
14 changed files with 40 additions and 49 deletions
|
|
@ -1273,11 +1273,12 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
node.addrman = std::move(*addrman);
|
||||
}
|
||||
|
||||
FastRandomContext rng;
|
||||
assert(!node.banman);
|
||||
node.banman = std::make_unique<BanMan>(args.GetDataDirNet() / "banlist", &uiInterface, args.GetIntArg("-bantime", DEFAULT_MISBEHAVING_BANTIME));
|
||||
assert(!node.connman);
|
||||
node.connman = std::make_unique<CConnman>(GetRand<uint64_t>(),
|
||||
GetRand<uint64_t>(),
|
||||
node.connman = std::make_unique<CConnman>(rng.rand64(),
|
||||
rng.rand64(),
|
||||
*node.addrman, *node.netgroupman, chainparams, args.GetBoolArg("-networkactive", true));
|
||||
|
||||
assert(!node.fee_estimator);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue