Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
signet.h
Go to the documentation of this file.
1// Copyright (c) 2019-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_SIGNET_H
6#define BITCOIN_SIGNET_H
7
8#include <primitives/block.h>
10
11#include <optional>
12
13class CScript;
14namespace Consensus {
15struct Params;
16} // namespace Consensus
17
21bool CheckSignetBlockSolution(const CBlock& block, const Consensus::Params& consensusParams);
22
30class SignetTxs {
31 template<class T1, class T2>
32 SignetTxs(const T1& to_spend, const T2& to_sign) : m_to_spend{to_spend}, m_to_sign{to_sign} { }
33
34public:
35 static std::optional<SignetTxs> Create(const CBlock& block, const CScript& challenge);
36
39};
40
41#endif // BITCOIN_SIGNET_H
Definition block.h:74
Serialized script, used inside transaction inputs and outputs.
Definition script.h:405
The basic transaction that is broadcasted on the network and contained in blocks.
SignetTxs(const T1 &to_spend, const T2 &to_sign)
Definition signet.h:32
static std::optional< SignetTxs > Create(const CBlock &block, const CScript &challenge)
Definition signet.cpp:70
const CTransaction m_to_sign
Definition signet.h:38
const CTransaction m_to_spend
Definition signet.h:37
Transaction validation functions.
bool CheckSignetBlockSolution(const CBlock &block, const Consensus::Params &consensusParams)
Extract signature and check whether a block has a valid solution.
Definition signet.cpp:126
Parameters that influence chain consensus.
Definition params.h:84