Support NODE_NETWORK_LIMITED by default

This commit is contained in:
Pieter Wuille 2019-08-09 16:52:18 -07:00
parent d54f39a1ee
commit 002bc0bbd5
2 changed files with 11 additions and 4 deletions

View file

@ -147,10 +147,14 @@ public:
}
}
if (filter_whitelist.empty()) {
filter_whitelist.insert(1);
filter_whitelist.insert(5);
filter_whitelist.insert(9);
filter_whitelist.insert(13);
filter_whitelist.insert(NODE_NETWORK);
filter_whitelist.insert(NODE_NETWORK | NODE_BLOOM);
filter_whitelist.insert(NODE_NETWORK | NODE_WITNESS);
filter_whitelist.insert(NODE_NETWORK | NODE_WITNESS | NODE_BLOOM);
filter_whitelist.insert(NODE_NETWORK_LIMITED);
filter_whitelist.insert(NODE_NETWORK_LIMITED | NODE_BLOOM);
filter_whitelist.insert(NODE_NETWORK_LIMITED | NODE_WITNESS);
filter_whitelist.insert(NODE_NETWORK_LIMITED | NODE_WITNESS | NODE_BLOOM);
}
if (host != NULL && ns == NULL) showHelp = true;
if (showHelp) fprintf(stderr, help, argv[0]);

View file

@ -60,6 +60,9 @@ class CMessageHeader
enum
{
NODE_NETWORK = (1 << 0),
NODE_BLOOM = (1 << 2),
NODE_WITNESS = (1 << 3),
NODE_NETWORK_LIMITED = (1 << 10),
};
class CAddress : public CService