]> Git Repo - VerusCoin.git/blame_incremental - src/cc/StakeGuard.h
Smart transaction improvements and multisig signing / validation fixes, activation...
[VerusCoin.git] / src / cc / StakeGuard.h
... / ...
CommitLineData
1/********************************************************************
2 * (C) 2018 Michael Toutonghi
3 *
4 * Distributed under the MIT software license, see the accompanying
5 * file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 *
7 * This crypto-condition eval solves the problem of nothing-at-stake
8 * in a proof of stake consensus system.
9 *
10 */
11
12#ifndef STAKEGUARD_H
13#define STAKEGUARD_H
14
15#include <vector>
16
17#include "CCinclude.h"
18#include "streams.h"
19#include "script/script.h"
20
21#define DEFAULT_STAKE_TXFEE 0
22
23bool UnpackStakeOpRet(const CTransaction &stakeTx, std::vector<std::vector<unsigned char>> &vData);
24
25bool GetStakeParams(const CTransaction &stakeTx, CStakeParams &stakeParams);
26
27bool ValidateStakeTransaction(const CTransaction &stakeTx, CStakeParams &stakeParams, bool validateSig = true);
28
29bool ValidateMatchingStake(const CTransaction &ccTx, uint32_t voutNum, const CTransaction &stakeTx, bool &cheating);
30
31bool MakeGuardedOutput(CAmount value, CPubKey &dest, CTransaction &stakeTx, CTxOut &vout);
32
33bool MakeCheatEvidence(CMutableTransaction &mtx, const CTransaction &ccTx, uint32_t voutNum, const CTransaction &cheatTx);
34
35bool StakeGuardValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx, uint32_t nIn, bool fulfilled);
36
37bool IsStakeGuardInput(const CScript &scriptSig);
38
39UniValue StakeGuardInfo();
40
41#endif
This page took 0.023034 seconds and 4 git commands to generate.