Create global PAK lists for config and blockchain state

This commit is contained in:
Gregory Sanders 2019-01-03 15:48:43 -05:00
parent 8c7746c4de
commit 6679823fc0
2 changed files with 17 additions and 0 deletions

View file

@ -5,6 +5,18 @@
#include <primitives/pak.h>
#include <pubkey.h>
// ELEMENTS
// PAK entries loaded by config file entries
// These will be embedded into coinbase transaction
// during block creation and tested against during
// testproposedblock
boost::optional<CPAKList> g_paklist_config;
// PAK entries loaded from latest coinbase pak commitment
CPAKList g_paklist_blockchain;
///////////
namespace {
static secp256k1_context *secp256k1_ctx_pak;

View file

@ -7,6 +7,7 @@
#include <script/script.h>
#include <secp256k1/include/secp256k1_whitelist.h>
#include <boost/optional.hpp>
class CPAKList
{
@ -74,5 +75,9 @@ public:
**/
bool ScriptHasValidPAKProof(const CScript& script, const uint256& genesis_hash);
// ELEMENTS:
extern boost::optional<CPAKList> g_paklist_config;
extern CPAKList g_paklist_blockchain;
///////////
#endif // BITCOIN_PRIMITIVES_PAK_H