mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Allow the default key to be unavailable
This solves the issue where no default key can be added after -salvagewallet.
This commit is contained in:
parent
77a1e12eed
commit
360cfe142c
4 changed files with 32 additions and 24 deletions
|
|
@ -4158,7 +4158,10 @@ CBlockTemplate* CreateNewBlock(CReserveKey& reservekey)
|
|||
txNew.vin.resize(1);
|
||||
txNew.vin[0].prevout.SetNull();
|
||||
txNew.vout.resize(1);
|
||||
txNew.vout[0].scriptPubKey << reservekey.GetReservedKey() << OP_CHECKSIG;
|
||||
CPubKey pubkey;
|
||||
if (!reservekey.GetReservedKey(pubkey))
|
||||
return NULL;
|
||||
txNew.vout[0].scriptPubKey << pubkey << OP_CHECKSIG;
|
||||
|
||||
// Add our coinbase tx as first transaction
|
||||
pblock->vtx.push_back(txNew);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue