mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01: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:
committed by
Pieter Wuille
parent
77a1e12eed
commit
360cfe142c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user