Browse Source

Create NODE_NSPV nServices flag

warmup
jl777 5 years ago
parent
commit
ab5954e7ef
  1. 2
      src/komodo_nSPV.h
  2. 2
      src/net.cpp
  3. 2
      src/protocol.cpp
  4. 5
      src/protocol.h

2
src/komodo_nSPV.h

@ -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++)

2
src/net.cpp

@ -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] = {};

2
src/protocol.cpp

@ -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;
}

5
src/protocol.h

@ -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

Loading…
Cancel
Save