26 std::ostringstream info;
39 std::string strError =
"";
46 LogPrintf(
"CDarkSendRelay::Sign -- GetKeysFromSecret() failed, invalid shared key %s\n", strSharedKey);
51 LogPrintf(
"CDarkSendRelay::Sign -- SignMessage() failed\n");
56 LogPrintf(
"CDarkSendRelay::Sign -- VerifyMessage() failed, error: %s\n", strError);
65 std::string strError =
"";
72 LogPrintf(
"CDarkSendRelay::VerifyMessage -- GetKeysFromSecret() failed, invalid shared key %s\n", strSharedKey);
77 LogPrintf(
"CDarkSendRelay::VerifyMessage -- VerifyMessage() failed, error: %s\n", strError);
87 int nRank1 = (rand() % nCount)+1;
88 int nRank2 = (rand() % nCount)+1;
91 while(nRank1 == nRank2) nRank2 = (rand() % nCount)+1;
110 pnode->PushMessage(
"dsr", (*
this));
vector< unsigned char > vchSig
void RelayThroughNode(int nRank)
static bool GetKeysFromSecret(const std::string strSecret, CKey &keyRet, CPubKey &pubkeyRet)
Set the private/public key values, returns true if successful.
std::string ToString() const
static bool VerifyMessage(const CPubKey pubkey, const std::vector< unsigned char > &vchSig, const std::string strMessage, std::string &strErrorRet)
Verify the message signature, returns true if succcessful.
bool GetMasternodeByRank(int nRank, masternode_info_t &mnInfoRet, int nBlockHeight=-1, int nMinProtocol=0)
int CountEnabled(int nProtocolVersion=-1)
std::string ToString() const
static const int MIN_PRIVATESEND_PEER_PROTO_VERSION
minimum peer version accepted by mixing pool
std::unique_ptr< CConnman > g_connman
bool Sign(std::string strSharedKey)
static bool SignMessage(const std::string strMessage, std::vector< unsigned char > &vchSigRet, const CKey key)
Sign the message, returns true if successful.
bool VerifyMessage(std::string strSharedKey)
vector< unsigned char > vchSig2