mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Use unique_ptr for pfilter (CBloomFilter)
This commit is contained in:
parent
8ccf1bb0c3
commit
f72cbf9ba9
3 changed files with 4 additions and 8 deletions
|
|
@ -2755,8 +2755,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
|||
else
|
||||
{
|
||||
LOCK(pfrom->cs_filter);
|
||||
delete pfrom->pfilter;
|
||||
pfrom->pfilter = new CBloomFilter(filter);
|
||||
pfrom->pfilter.reset(new CBloomFilter(filter));
|
||||
pfrom->pfilter->UpdateEmptyFull();
|
||||
pfrom->fRelayTxes = true;
|
||||
}
|
||||
|
|
@ -2792,8 +2791,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
|||
{
|
||||
LOCK(pfrom->cs_filter);
|
||||
if (pfrom->GetLocalServices() & NODE_BLOOM) {
|
||||
delete pfrom->pfilter;
|
||||
pfrom->pfilter = new CBloomFilter();
|
||||
pfrom->pfilter.reset(new CBloomFilter());
|
||||
}
|
||||
pfrom->fRelayTxes = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue