mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
[init] Use MakeUnique<> to construct peerman
This commit is contained in:
parent
f3f61d0eb9
commit
4d510aa055
1 changed files with 2 additions and 1 deletions
|
@ -1396,7 +1396,8 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA
|
|||
node.chainman = &g_chainman;
|
||||
ChainstateManager& chainman = *Assert(node.chainman);
|
||||
|
||||
node.peerman.reset(new PeerManager(chainparams, *node.connman, node.banman.get(), *node.scheduler, chainman, *node.mempool));
|
||||
assert(!node.peerman);
|
||||
node.peerman = MakeUnique<PeerManager>(chainparams, *node.connman, node.banman.get(), *node.scheduler, chainman, *node.mempool);
|
||||
RegisterValidationInterface(node.peerman.get());
|
||||
|
||||
// sanitize comments per BIP-0014, format user agent and check total size
|
||||
|
|
Loading…
Reference in a new issue