diff --git a/src/komodo_nSPV.h b/src/komodo_nSPV.h new file mode 100644 index 000000000..133dcee48 --- /dev/null +++ b/src/komodo_nSPV.h @@ -0,0 +1,57 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2009-2014 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +/****************************************************************************** + * Copyright © 2014-2019 The SuperNET Developers. * + * * + * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * + * the top-level directory of this distribution for the individual copyright * + * holder information and the developer policies on copyright and licensing. * + * * + * Unless otherwise agreed in a custom licensing agreement, no part of the * + * SuperNET software, including this file may be copied, modified, propagated * + * or distributed except according to the terms contained in the LICENSE file * + * * + * Removal or modification of this copyright notice is prohibited. * + * * + ******************************************************************************/ + +#ifndef KOMODO_NSPV_H +#define KOMODO_NSPV_H + +void komodo_nSPVreq(CNode *pfrom,std::vector payload) // received a request +{ + +} + +void komodo_nSPVresp(CNode *pfrom,std::vector payload) // received a response +{ + +} + +/*void komodo_sendnSPV(int32_t minpeers,int32_t maxpeers,const char *message,std::vector payload) +{ + int32_t numsent = 0; + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + { + if ( pnode->hSocket == INVALID_SOCKET ) + continue; + if ( numsent < minpeers || (rand() % 10) == 0 ) + { + //fprintf(stderr,"pushmessage\n"); + pnode->PushMessage(message,payload); + if ( numsent++ > maxpeers ) + break; + } + } +}*/ + +void komodo_nSPV(CNode *pto) // issue nSPV requests if has nServices +{ + +} + +#endif // KOMODO_NSPV_H diff --git a/src/main.cpp b/src/main.cpp index 1d5258a58..61f282541 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7046,20 +7046,7 @@ void static ProcessGetData(CNode* pfrom) } } -void komodo_nSPVreq(CNode *pfrom,std::vector payload) // received a request -{ - -} - -void komodo_nSPVresp(CNode *pfrom,std::vector payload) // received a response -{ - -} - -void komodo_nSPV(CNode *pto) // issue nSPV requests if has nServices -{ - -} +#include "komodo_nSPV.h" bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeReceived) { diff --git a/src/net.cpp b/src/net.cpp index 98d7d67bb..7181f8a95 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -458,7 +458,7 @@ void CNode::PushVersion() LogPrint("net", "send version message: version %d, blocks=%d, us=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), id); PushMessage("version", PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe, nLocalHostNonce, strSubVersion, nBestHeight, true); - fprintf(stderr,"PUSH services.%llx\n",(long long)nLocalServices); +fprintf(stderr,"PUSH services.%llx\n",(long long)nLocalServices); }