dash/src/darksend-relay.h

52 lines
1.2 KiB
C
Raw Normal View History

2015-03-02 00:09:33 +01:00
2016-12-20 14:26:45 +01:00
// Copyright (c) 2014-2017 The Dash Core developers
2015-03-02 00:09:33 +01:00
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef DARKSEND_RELAY_H
#define DARKSEND_RELAY_H
#include "validation.h"
2015-03-02 00:09:33 +01:00
#include "activemasternode.h"
#include "masternodeman.h"
class CDarkSendRelay
{
public:
CTxIn vinMasternode;
2015-03-02 00:09:33 +01:00
vector<unsigned char> vchSig;
vector<unsigned char> vchSig2;
int nBlockHeight;
int nRelayType;
CTxIn in;
CTxOut out;
CDarkSendRelay();
2015-03-05 16:08:03 +01:00
CDarkSendRelay(CTxIn& vinMasternodeIn, vector<unsigned char>& vchSigIn, int nBlockHeightIn, int nRelayTypeIn, CTxIn& in2, CTxOut& out2);
2015-03-02 00:09:33 +01:00
2015-04-03 00:51:08 +02:00
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
READWRITE(vinMasternode);
2015-03-02 00:09:33 +01:00
READWRITE(vchSig);
READWRITE(vchSig2);
READWRITE(nBlockHeight);
READWRITE(nRelayType);
READWRITE(in);
READWRITE(out);
2015-04-03 00:51:08 +02:00
}
2015-03-02 00:09:33 +01:00
std::string ToString();
2015-03-05 16:08:03 +01:00
bool Sign(std::string strSharedKey);
2015-03-02 00:09:33 +01:00
bool VerifyMessage(std::string strSharedKey);
void Relay();
void RelayThroughNode(int nRank);
};
#endif