Page MenuHomePhabricator

[avalanche] Fix bytes received tracking for avalanche messages
ClosedPublic

Authored by roqqit on Jul 11 2024, 23:00.

Details

Reviewers
Fabien
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC9065327743ae: [avalanche] Fix bytes received tracking for avalanche messages
Summary

getpeerinfo currently tracks all avalanche messages as "*other*" for bytesrecv_per_msg but correctly tracks all message types (avalanche included) for bytessent_per_msg. This fix adds them to bytesrecv_per_msg.

Test Plan
ninja
bitcoind -daemon
bitcoin-cli getpeerinfo

Before patch example:

"bytesrecv_per_msg": {
  "*other*": 15359133,
  "addrv2": 533731,
  "cmpctblock": 501,
  "feefilter": 32,
  "getdata": 1220,
  "getheaders": 1053,
  "headers": 842001,
  "inv": 352088,
  "ping": 1338368,
  "pong": 1338304,
  "sendaddrv2": 24,
  "sendcmpct": 33,
  "sendheaders": 24,
  "tx": 726446,
  "verack": 24,
  "version": 146
},

After patch example:

"bytesrecv_per_msg": {
  "addrv2": 19592,
  "avahello": 351,
  "avaproof": 457,
  "feefilter": 32,
  "getheaders": 1053,
  "ping": 32,
  "pong": 32,
  "sendaddrv2": 24,
  "sendcmpct": 33,
  "verack": 24,
  "version": 146
},

Diff Detail