Page MenuHomePhabricator

Factorize flushing the inventory buffer when it reaches its max size
ClosedPublic

Authored by Fabien on May 10 2021, 08:44.

Details

Summary

The code is duplicated and more will be needed for D9489.

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.May 10 2021, 08:44
This revision is now accepted and ready to land.May 10 2021, 14:12
deadalnix requested changes to this revision.May 10 2021, 14:51
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/net_processing.cpp
5196 ↗(On Diff #28399)

You need to move this. Why would you copy all the content, just so that you can clear it immediately after?

5339 ↗(On Diff #28399)

Put it there. This is where the rest of the code related to sending inv is (such as the number of transaction relayed).

This revision now requires changes to proceed.May 10 2021, 14:51

Address feedback

src/net_processing.cpp
5196 ↗(On Diff #28399)

I would have expected the clear() to trigger a use after move warning, TIL

This revision is now accepted and ready to land.May 10 2021, 15:36