13 std::ostringstream ss;
31 return strprintf(
"ProRegPL(nVersion=%d, collateralOutpoint=%s, addr=%s, nOperatorReward=%f, ownerAddress=%s, operatorPubKey=%s, votingAddress=%s, scriptPayout=%s)",
62 return state.
DoS(100,
false, REJECT_INVALID,
"bad-protx-version");
65 return state.
DoS(100,
false, REJECT_INVALID,
"bad-protx-type");
68 return state.
DoS(100,
false, REJECT_INVALID,
"bad-protx-mode");
72 return state.
DoS(10,
false, REJECT_INVALID,
"bad-protx-key-null");
75 return state.
DoS(10,
false, REJECT_INVALID,
"bad-protx-operator-key-invalid");
79 return state.
DoS(10,
false, REJECT_INVALID,
"bad-protx-payee");
82 return state.
DoS(10,
false, REJECT_INVALID,
"bad-protx-operator-payee");
88 return state.
DoS(10,
false, REJECT_INVALID,
"bad-protx-payee-dest");
93 return state.
DoS(10,
false, REJECT_INVALID,
"bad-protx-payee-reuse");
97 return state.
DoS(10,
false, REJECT_INVALID,
"bad-protx-operator-reward");
107 return strprintf(
"ProUpServPL(nVersion=%d, proTxHash=%s, addr=%s, operatorPayoutAddress=%s)",
128 return state.
DoS(100,
false, REJECT_INVALID,
"bad-protx-version");
138 return strprintf(
"ProUpRegPL(nVersion=%d, proTxHash=%s, operatorPubKey=%s, votingAddress=%s, payoutAddress=%s)",
160 return state.
DoS(100,
false, REJECT_INVALID,
"bad-protx-version");
163 return state.
DoS(100,
false, REJECT_INVALID,
"bad-protx-mode");
167 return state.
DoS(10,
false, REJECT_INVALID,
"bad-protx-operator-key-invalid");
170 return state.
DoS(10,
false, REJECT_INVALID,
"bad-protx-voting-key-null");
174 return state.
DoS(10,
false, REJECT_INVALID,
"bad-protx-payee");
182 return strprintf(
"ProUpRevPL(nVersion=%d, proTxHash=%s, nReason=%d)",
199 return state.
DoS(100,
false, REJECT_INVALID,
"bad-protx-version");
205 return state.
DoS(100,
false, REJECT_INVALID,
"bad-protx-reason");
215 if (!tx->IsSpecialTx() || tx->nType != CTransaction::TxType::PROREG) {
const CChainParams & Params()
Return the currently selected parameters.
std::string ToStringShort() const
An outpoint - a combination of a transaction hash and an index n into its vout.
bool IsPayToPublicKeyHash() const
std::string ToString() const
Capture information about block/transaction validation.
bool DoS(int level, bool ret=false, unsigned int chRejectCodeIn=0, std::string strRejectReasonIn="", bool corruptionIn=false, const std::string &strDebugMessageIn="")
static const uint16_t CURRENT_VERSION
std::string ToString() const
CScript scriptOperatorPayout
COutPoint collateralOutpoint
void ToJson(UniValue &obj) const
CBLSPublicKey pubKeyOperator
std::string MakeSignString() const
bool IsTriviallyValid(CValidationState &state) const
static const uint16_t CURRENT_VERSION
std::string ToString() const
bool IsTriviallyValid(CValidationState &state) const
CBLSPublicKey pubKeyOperator
void ToJson(UniValue &obj) const
void ToJson(UniValue &obj) const
bool IsTriviallyValid(CValidationState &state) const
static const uint16_t CURRENT_VERSION
std::string ToString() const
std::string ToString() const
static const uint16_t CURRENT_VERSION
void ToJson(UniValue &obj) const
CScript scriptOperatorPayout
bool IsTriviallyValid(CValidationState &state) const
bool pushKV(const std::string &key, const UniValue &val)
std::string ToString() const
uint256 SerializeHash(const T &obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION)
Compute the 256-bit hash of an object's serialization.
std::string EncodeDestination(const CWDestination &address, const CChainParams::Base58Type addrType)
std::string EncodePublic(const CChainParams ¶ms, const CBLSPublicKey &pk)
bool GetProRegCollateral(const CTransactionRef &tx, COutPoint &outRet)
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet, bool fColdStake)
Parse a standard scriptPubKey for the destination address.
boost::variant< CNoDestination, CKeyID, CScriptID, CExchangeKeyID > CTxDestination
A txout script template with a specific destination.
bool GetTxPayload(const std::vector< unsigned char > &payload, T &obj)
std::shared_ptr< const CTransaction > CTransactionRef
std::string HexStr(const Span< const uint8_t > s)
Convert a span of bytes to a lower-case hexadecimal string.