Merge #19191: net: Extract download permission from noban

fa0540cd46 net: Extract download permission from noban (MarcoFalke)

Pull request description:

  It should be possible to grant nodes in a local network (e.g. home, university, enterprise, ...) permission to download blocks even after the maxuploadtarget is hit.

  Currently this is only possible by setting the `noban` permission, which has some adverse effects, especially if the peers can't be fully trusted.

  Fix this by extracting a `download` permission from `noban`.

ACKs for top commit:
  jonatack:
    ACK fa0540c
  Sjors:
    re-utACK fa0540cd46

Tree-SHA512: 255566baa43ae925d93f5d0a3aa66b475a556d1590f662a88278a4872f16a1a05739a6119ae48a293011868042e05cb264cffe5822a50fb80db7333bf44376d9
This commit is contained in:
MarcoFalke
2020-07-09 17:02:20 +02:00
11 changed files with 43 additions and 29 deletions

View File

@@ -2644,7 +2644,7 @@ void CConnman::RecordBytesSent(uint64_t bytes)
nMaxOutboundTotalBytesSentInCycle = 0;
}
// TODO, exclude peers with noban permission
// TODO, exclude peers with download permission
nMaxOutboundTotalBytesSentInCycle += bytes;
}