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

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

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

5339

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

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