mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Merge pull request #235 from kallewoof/getnewblockhex-coinbase
getnewblockhex would use regtest coinbase hard coded, instead of fetc…
This commit is contained in:
commit
4985bc5092
1 changed files with 3 additions and 1 deletions
|
|
@ -168,7 +168,9 @@ UniValue getnewblockhex(const JSONRPCRequest& request)
|
|||
+ HelpExampleCli("getnewblockhex", "")
|
||||
);
|
||||
|
||||
std::unique_ptr<CBlockTemplate> pblocktemplate(BlockAssembler(Params()).CreateNewBlock(CScript() << OP_TRUE));
|
||||
CScript feeDestinationScript = Params().CoinbaseDestination();
|
||||
if (feeDestinationScript == CScript()) feeDestinationScript = CScript() << OP_TRUE;
|
||||
std::unique_ptr<CBlockTemplate> pblocktemplate(BlockAssembler(Params()).CreateNewBlock(feeDestinationScript));
|
||||
if (!pblocktemplate.get())
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Wallet keypool empty");
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue