mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Guard wallet code in pow.cpp with ENABLE_WALLET
This commit is contained in:
parent
1ac550c4f1
commit
f226262657
1 changed files with 5 additions and 0 deletions
|
|
@ -14,9 +14,12 @@
|
||||||
#include "script/standard.h"
|
#include "script/standard.h"
|
||||||
#include "uint256.h"
|
#include "uint256.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
#ifdef ENABLE_WALLET
|
||||||
#include "wallet.h"
|
#include "wallet.h"
|
||||||
|
|
||||||
extern CWallet* pwalletMain;
|
extern CWallet* pwalletMain;
|
||||||
|
#endif
|
||||||
|
|
||||||
CScript CombineBlockSignatures(const CBlockHeader& header, const CScript& scriptSig1, const CScript& scriptSig2)
|
CScript CombineBlockSignatures(const CBlockHeader& header, const CScript& scriptSig1, const CScript& scriptSig2)
|
||||||
{
|
{
|
||||||
|
|
@ -60,10 +63,12 @@ bool CheckProof(const CBlockHeader& block)
|
||||||
return GenericVerifyScript(block.proof.solution, block.proof.challenge, SCRIPT_VERIFY_P2SH, block);
|
return GenericVerifyScript(block.proof.solution, block.proof.challenge, SCRIPT_VERIFY_P2SH, block);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_WALLET
|
||||||
bool GenerateProof(CBlockHeader *pblock, CWallet *pwallet)
|
bool GenerateProof(CBlockHeader *pblock, CWallet *pwallet)
|
||||||
{
|
{
|
||||||
return GenericSignScript(*pwallet, *pblock, pblock->proof.challenge, pblock->proof.solution);
|
return GenericSignScript(*pwallet, *pblock, pblock->proof.challenge, pblock->proof.solution);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void ResetProof(CBlockHeader& block)
|
void ResetProof(CBlockHeader& block)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue