aboutsummaryrefslogtreecommitdiff
path: root/src/rpcrawtransaction.cpp
diff options
context:
space:
mode:
authorJeff Garzik <[email protected]>2013-08-25 00:00:02 -0400
committerJeff Garzik <[email protected]>2013-10-01 16:14:37 -0400
commitb0730874d95e42953736f49d8041221d698ed95a (patch)
treedb3e8841f61b5efccfbc1b4bc2a0b99380a64ce0 /src/rpcrawtransaction.cpp
parentMerge pull request #2888 from litecoin-project/getnetworkhashps (diff)
downloaddiscoin-b0730874d95e42953736f49d8041221d698ed95a.tar.xz
discoin-b0730874d95e42953736f49d8041221d698ed95a.zip
Support absence of wallet (pwalletMain==NULL) in several locations,
notably RPC.
Diffstat (limited to 'src/rpcrawtransaction.cpp')
-rw-r--r--src/rpcrawtransaction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index ce9d60e66..fcc5359dd 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -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)