mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-23 14:10:15 +01:00
net: use std::chrono throughout maxOutbound logic
This commit is contained in:
@@ -487,12 +487,12 @@ static RPCHelpMan getnettotals()
|
||||
obj.pushKV("timemillis", GetTimeMillis());
|
||||
|
||||
UniValue outboundLimit(UniValue::VOBJ);
|
||||
outboundLimit.pushKV("timeframe", node.connman->GetMaxOutboundTimeframe());
|
||||
outboundLimit.pushKV("timeframe", count_seconds(node.connman->GetMaxOutboundTimeframe()));
|
||||
outboundLimit.pushKV("target", node.connman->GetMaxOutboundTarget());
|
||||
outboundLimit.pushKV("target_reached", node.connman->OutboundTargetReached(false));
|
||||
outboundLimit.pushKV("serve_historical_blocks", !node.connman->OutboundTargetReached(true));
|
||||
outboundLimit.pushKV("bytes_left_in_cycle", node.connman->GetOutboundTargetBytesLeft());
|
||||
outboundLimit.pushKV("time_left_in_cycle", node.connman->GetMaxOutboundTimeLeftInCycle());
|
||||
outboundLimit.pushKV("time_left_in_cycle", count_seconds(node.connman->GetMaxOutboundTimeLeftInCycle()));
|
||||
obj.pushKV("uploadtarget", outboundLimit);
|
||||
return obj;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user