diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-06-06 17:07:25 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-07-09 12:48:05 +0200 |
commit | fa0540cd46eaf44d9e1a9f91c3a937986826c4fa (patch) | |
tree | 1bac883d22116dcb2cf9f65e315de8d1a6c4f148 /src/net_permissions.h | |
parent | f7c19e829eca10ce8b4acafc61264f8bb9b922f3 (diff) |
net: Extract download permission from noban
Diffstat (limited to 'src/net_permissions.h')
-rw-r--r-- | src/net_permissions.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/net_permissions.h b/src/net_permissions.h index 2cf85120fe..a9633ee2ae 100644 --- a/src/net_permissions.h +++ b/src/net_permissions.h @@ -14,8 +14,7 @@ struct bilingual_str; extern const std::vector<std::string> NET_PERMISSIONS_DOC; -enum NetPermissionFlags -{ +enum NetPermissionFlags { PF_NONE = 0, // Can query bloomfilter even if -peerbloomfilters is false PF_BLOOMFILTER = (1U << 1), @@ -24,14 +23,16 @@ enum NetPermissionFlags // Always relay transactions from this peer, even if already in mempool // Keep parameter interaction: forcerelay implies relay PF_FORCERELAY = (1U << 2) | PF_RELAY, + // Allow getheaders during IBD and block-download after maxuploadtarget limit + PF_DOWNLOAD = (1U << 6), // Can't be banned/disconnected/discouraged for misbehavior - PF_NOBAN = (1U << 4), + PF_NOBAN = (1U << 4) | PF_DOWNLOAD, // Can query the mempool PF_MEMPOOL = (1U << 5), // True if the user did not specifically set fine grained permissions PF_ISIMPLICIT = (1U << 31), - PF_ALL = PF_BLOOMFILTER | PF_FORCERELAY | PF_RELAY | PF_NOBAN | PF_MEMPOOL, + PF_ALL = PF_BLOOMFILTER | PF_FORCERELAY | PF_RELAY | PF_NOBAN | PF_MEMPOOL | PF_DOWNLOAD, }; class NetPermissions |