159 | @@ -160,7 +160,9 @@ static RPCMethod getprivatebroadcastinfo()
160 | {RPCResult::Type::STR_HEX, "wtxid", "The transaction witness hash in hex"},
161 | {RPCResult::Type::STR_HEX, "hex", "The serialized, hex-encoded transaction data"},
162 | {RPCResult::Type::NUM_TIME, "time_added", "The time this transaction was added to the private broadcast queue (seconds since epoch)"},
163 | - {RPCResult::Type::ARR, "peers", "Per-peer send and acknowledgment information for this transaction",
164 | + {RPCResult::Type::NUM, "num_sent", "Total number of peers this transaction was sent to so far"},
165 | + {RPCResult::Type::NUM, "num_acknowledged", "Total number of peers that acknowledged reception of this transaction"},
166 | + {RPCResult::Type::ARR, "peers", "Per-peer send and acknowledgment information for this transaction, for currently connected peers only",
If we make this change, is it worth reporting this? It will only have a value for max 3 minutes, and the received field will only ever have a value for a tiny amount of time that will require racing between receiving the PONG and disconnecting.
If we don't think we should store this data for stats a la #34707, we should remove these fields IMO. If we think they're valuable, we should instead cap this to last ~3 peers instead and just truncate the vector as we make more connections.
A limited buffer of disconnected peer stats, in addition to all the live ones, could make sense, if that's what you're suggesting