diff options
author | Pieter Wuille <pieter@wuille.net> | 2024-06-27 11:40:00 -0400 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2024-07-01 12:39:53 -0400 |
commit | ddc184d999d7e1a87efaf6bcb222186f0dcd87ec (patch) | |
tree | b5f108b5f86a71f952df306ef80fd6af9ee3d652 /src/init.cpp | |
parent | e2d1f84858485650ff743753ffa5c679f210a992 (diff) |
random: get rid of GetRand by inlining
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index 44c256d203..0022aeb039 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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); |