tests: Fuzz HasAllDesirableServiceFlags(...) and MayHaveUsefulAddressDB(...)

This commit is contained in:
practicalswift 2020-03-11 12:06:12 +00:00
parent 47a263108b
commit 7a861a62c1

View File

@ -14,6 +14,7 @@
#include <netbase.h> #include <netbase.h>
#include <policy/settings.h> #include <policy/settings.h>
#include <pow.h> #include <pow.h>
#include <protocol.h>
#include <pubkey.h> #include <pubkey.h>
#include <rpc/util.h> #include <rpc/util.h>
#include <script/signingprovider.h> #include <script/signingprovider.h>
@ -216,4 +217,10 @@ void test_one_input(const std::vector<uint8_t>& buffer)
stream >> deserialized_b; stream >> deserialized_b;
assert(b == deserialized_b && stream.empty()); assert(b == deserialized_b && stream.empty());
} }
{
const ServiceFlags service_flags = (ServiceFlags)u64;
(void)HasAllDesirableServiceFlags(service_flags);
(void)MayHaveUsefulAddressDB(service_flags);
}
} }