mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
Introduce -maxuploadtarget
* -maxuploadtarget can be set in MiB * if <limit> - ( time-left-in-24h-cycle / 600 * MAX_BLOCK_SIZE ) has reach, stop serve blocks older than one week and filtered blocks * no action if limit has reached, no guarantee that the target will not be surpassed * add outbound limit informations to rpc getnettotals
This commit is contained in:
committed by
Jonas Schnelli
parent
867d6c90b8
commit
872fee3fcc
@@ -379,6 +379,15 @@ UniValue getnettotals(const UniValue& params, bool fHelp)
|
||||
obj.push_back(Pair("totalbytesrecv", CNode::GetTotalBytesRecv()));
|
||||
obj.push_back(Pair("totalbytessent", CNode::GetTotalBytesSent()));
|
||||
obj.push_back(Pair("timemillis", GetTimeMillis()));
|
||||
|
||||
UniValue outboundLimit(UniValue::VOBJ);
|
||||
outboundLimit.push_back(Pair("timeframe", CNode::GetMaxOutboundTimeframe()));
|
||||
outboundLimit.push_back(Pair("target", CNode::GetMaxOutboundTarget()));
|
||||
outboundLimit.push_back(Pair("target_reached", CNode::OutboundTargetReached(false)));
|
||||
outboundLimit.push_back(Pair("serve_historical_blocks", !CNode::OutboundTargetReached(true)));
|
||||
outboundLimit.push_back(Pair("bytes_left_in_cycle", CNode::GetOutboundTargetBytesLeft()));
|
||||
outboundLimit.push_back(Pair("time_left_in_cycle", CNode::GetMaxOutboundTimeLeftInCycle()));
|
||||
obj.push_back(Pair("uploadtarget", outboundLimit));
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user