Create NODE_NSPV nServices flag

This commit is contained in:
jl777
2019-07-02 08:56:09 -11:00
parent b876a9b929
commit ab5954e7ef
4 changed files with 7 additions and 4 deletions

View File

@@ -185,6 +185,8 @@ void komodo_nSPVresp(CNode *pfrom,std::vector<uint8_t> response) // received a r
void komodo_nSPV(CNode *pto)
{
std::vector<uint8_t> request; int32_t i; uint32_t timestamp = (uint32_t)time(NULL);
if ( (pto->nServices & NODE_NSPV) == 0 )
return;
if ( timestamp > pto->lastntzs || timestamp > pto->lastproof )
{
for (i=0; i<NSPV_utxos.size(); i++)

View File

@@ -83,7 +83,7 @@ extern char ASSETCHAINS_SYMBOL[65];
bool fDiscover = true;
bool fListen = true;
uint64_t nLocalServices = NODE_NETWORK;
uint64_t nLocalServices = NODE_NETWORK | NODE_NSPV;
CCriticalSection cs_mapLocalHost;
map<CNetAddr, LocalServiceInfo> mapLocalHost;
static bool vfLimited[NET_MAX] = {};

View File

@@ -102,7 +102,7 @@ CAddress::CAddress(CService ipIn, uint64_t nServicesIn) : CService(ipIn)
void CAddress::Init()
{
nServices = NODE_NETWORK;
nServices = NODE_NETWORK | NODE_NSPV;
nTime = 100000000;
}

View File

@@ -91,8 +91,9 @@ enum {
// but no longer do as of protocol version 170004 (= NO_BLOOM_VERSION)
NODE_BLOOM = (1 << 2),
NODE_ADDRINDEX = (1 << 30),
NODE_SPENTINDEX = (1 << 29),
NODE_NSPV = (1 << 30),
NODE_ADDRINDEX = (1 << 29),
NODE_SPENTINDEX = (1 << 28),
// Bits 24-31 are reserved for temporary experiments. Just pick a bit that
// isn't getting used, or one not being used much, and notify the