mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Support absence of wallet (pwalletMain==NULL) in several locations,
notably RPC.
This commit is contained in:
@@ -171,6 +171,7 @@ Value listunspent(const Array& params, bool fHelp)
|
||||
|
||||
Array results;
|
||||
vector<COutput> vecOutputs;
|
||||
assert(pwalletMain != NULL);
|
||||
pwalletMain->AvailableCoins(vecOutputs, false);
|
||||
BOOST_FOREACH(const COutput& out, vecOutputs)
|
||||
{
|
||||
@@ -458,7 +459,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
|
||||
}
|
||||
}
|
||||
|
||||
const CKeyStore& keystore = (fGivenKeys ? tempKeystore : *pwalletMain);
|
||||
const CKeyStore& keystore = ((fGivenKeys || !pwalletMain) ? tempKeystore : *pwalletMain);
|
||||
|
||||
int nHashType = SIGHASH_ALL;
|
||||
if (params.size() > 3 && params[3].type() != null_type)
|
||||
|
||||
Reference in New Issue
Block a user