Add nHeight
This commit is contained in:
@@ -214,7 +214,7 @@ UniValue generate(const UniValue& params, bool fHelp)
|
|||||||
lastTime = GetTime();
|
lastTime = GetTime();
|
||||||
|
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
std::unique_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
|
std::unique_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey,nHeight));
|
||||||
#else
|
#else
|
||||||
std::unique_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey());
|
std::unique_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey());
|
||||||
#endif
|
#endif
|
||||||
@@ -639,7 +639,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
|
|||||||
}
|
}
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
CReserveKey reservekey(pwalletMain);
|
CReserveKey reservekey(pwalletMain);
|
||||||
pblocktemplate = CreateNewBlockWithKey(reservekey);
|
pblocktemplate = CreateNewBlockWithKey(reservekey,chainActive.Tip()->nHeight+1);
|
||||||
#else
|
#else
|
||||||
pblocktemplate = CreateNewBlockWithKey();
|
pblocktemplate = CreateNewBlockWithKey();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user