]> Git Repo - VerusCoin.git/blame - src/cc/StakeGuard.h
Smart transaction improvements and multisig signing / validation fixes, activation...
[VerusCoin.git] / src / cc / StakeGuard.h
CommitLineData
8a727a26 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
8fc4030c
MT
12#ifndef STAKEGUARD_H
13#define STAKEGUARD_H
8a727a26 14
15#include <vector>
16
17#include "CCinclude.h"
18#include "streams.h"
19#include "script/script.h"
20
3bfa5e22 21#define DEFAULT_STAKE_TXFEE 0
86e31e3d 22
06f41160 23bool UnpackStakeOpRet(const CTransaction &stakeTx, std::vector<std::vector<unsigned char>> &vData);
24
905fe35e 25bool GetStakeParams(const CTransaction &stakeTx, CStakeParams &stakeParams);
26
f3b0d2ab 27bool ValidateStakeTransaction(const CTransaction &stakeTx, CStakeParams &stakeParams, bool validateSig = true);
8a727a26 28
f3b0d2ab 29bool ValidateMatchingStake(const CTransaction &ccTx, uint32_t voutNum, const CTransaction &stakeTx, bool &cheating);
905fe35e 30
8a727a26 31bool MakeGuardedOutput(CAmount value, CPubKey &dest, CTransaction &stakeTx, CTxOut &vout);
32
905fe35e 33bool MakeCheatEvidence(CMutableTransaction &mtx, const CTransaction &ccTx, uint32_t voutNum, const CTransaction &cheatTx);
86e31e3d 34
4ecaf167 35bool StakeGuardValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx, uint32_t nIn, bool fulfilled);
8a727a26 36
ec8a120b 37bool IsStakeGuardInput(const CScript &scriptSig);
38
ca4a5f26 39UniValue StakeGuardInfo();
8a727a26 40
41#endif
This page took 0.086619 seconds and 4 git commands to generate.