Page MenuHomePhabricator

Extract inv saturation check and data request time computation
ClosedPublic

Authored by Fabien on May 27 2021, 19:01.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABCe19bc0f9629c: Extract inv saturation check and data request time computation
Summary

The functions are extracted from the PeerManager::AddTxAnnouncement()
method so they can be reused for proofs announcements as well. They take
the InvRequestTracker as a parameter as well as a structure containing
the inventory specific parameters.

Part of T1611

Test Plan
ninja all check-all
./test/functional/test_runner.py p2p_inv_download

Diff Detail

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

Event Timeline

Fabien requested review of this revision.May 27 2021, 19:02
deadalnix requested changes to this revision.May 27 2021, 20:15
deadalnix added a subscriber: deadalnix.

Looks good overall.

src/net_processing.cpp
133 ↗(On Diff #28654)

newline

938 ↗(On Diff #28654)

Breaking news :) newlines are free!

942 ↗(On Diff #28654)

It doesn't seem optimal to use the same permission for both here.

947 ↗(On Diff #28654)

**

This revision now requires changes to proceed.May 27 2021, 20:15

Add 3 extra bytes for more pleasure

Make the getdata interval part of the structure

This revision is now accepted and ready to land.May 28 2021, 13:05
deadalnix requested changes to this revision.May 28 2021, 13:16

Reviewing patches based on top of this, it is abundantly clear that that hasn't been thought through at all.

This revision now requires changes to proceed.May 28 2021, 13:16

Add the limit bypass permission flags to the structure so we can use different permission for tx and proofs without adding much to the code

This revision is now accepted and ready to land.Jun 3 2021, 13:51
Mengerian added a task: Restricted Maniphest Task.Jun 3 2021, 18:22