Not sure if we want to have this is master.
This adds a sent/recv byte counter per command to each CNode.
It is a waste product of some statistics gathering during finding a strategy for throttling nodes without affecting the overall quality of the network.
I think throttling the block response to a node with a height < self.height - 288 (TBD) would be a good approach. Nodes in initial sync might need longer to catch up if they are connected to throttled nodes only. Initial sync is a one time process and is therefore (maybe) be not very time critical.
Example:
"bytessent_per_cmd": {
"addr": 30003,
"block": 28981980,
"getheaders": 9682,
"headers": 82,
"inv": 30843,
"ping": 48,
"pong": 40,
"tx": 97400,
"verack": 0,
"version": 103
},
"bytesrecv_per_cmd": {
"getaddr": 0,
"getdata": 11935,
"getheaders": 997,
"headers": 1458027,
"ping": 40,
"pong": 40,
"reject": 230,
"verack": 0,
"version": 102
}