Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/util.cpp
Show All 10 Lines | |||||
#include <script/standard.h> | #include <script/standard.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
#include <limits> | #include <limits> | ||||
namespace avalanche { | namespace avalanche { | ||||
Proof buildRandomProof(uint32_t score, const CPubKey &master) { | Proof buildRandomProof(uint32_t score, const CPubKey &master) { | ||||
CKey key; | auto key = CKey::MakeCompressedKey(); | ||||
key.MakeNewKey(true); | |||||
const COutPoint o(TxId(GetRandHash()), 0); | const COutPoint o(TxId(GetRandHash()), 0); | ||||
const Amount v = (int64_t(score) * COIN) / 100; | const Amount v = (int64_t(score) * COIN) / 100; | ||||
const int height = 1234; | const int height = 1234; | ||||
const bool is_coinbase = false; | const bool is_coinbase = false; | ||||
{ | { | ||||
CScript script = GetScriptForDestination(PKHash(key.GetPubKey())); | CScript script = GetScriptForDestination(PKHash(key.GetPubKey())); | ||||
Show All 21 Lines |