From e7cd541cf195bd0cf804b4ba0ce4b4a8b1ed03ce Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 2 Jul 2019 03:32:24 -1100 Subject: [PATCH] nServices bits NODE_ADDRINDEX and NODE_SPENTINDEX --- src/init.cpp | 7 +++++++ src/protocol.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/init.cpp b/src/init.cpp index ca8252f29..0e770d3a8 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1065,7 +1065,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) #ifdef ENABLE_WALLET bool fDisableWallet = GetBoolArg("-disablewallet", false); if ( KOMODO_NSPV != 0 ) + { fDisableWallet = true; + nLocalServices &= ~NODE_NETWORK; + } if (!fDisableWallet) RegisterWalletRPCCommands(tableRPC); #endif @@ -1901,6 +1904,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) PruneAndFlush(); } } + if ( GetBoolArg("-addressindex", DEFAULT_ADDRESSINDEX) != 0 ) + nLocalServices |= NODE_ADDRINDEX; + if ( GetBoolArg("-spentindex", DEFAULT_SPENTINDEX) != 0 ) + nLocalServices |= NODE_SPENTINDEX; // ********************************************************* Step 10: import blocks diff --git a/src/protocol.h b/src/protocol.h index d2a3cf556..6b1536d6f 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -91,6 +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), + // 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 // bitcoin-development mailing list. Remember that service bits are just