Skip to content

Commit

Permalink
Update signrawtransaction to not throw error when wallet is locked.
Browse files Browse the repository at this point in the history
  • Loading branch information
Emeth authored and Emeth committed Mar 5, 2015
1 parent 0cf0117 commit cebaed9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bitcoinrpc.cpp
Expand Up @@ -3013,8 +3013,10 @@ Value signrawtransaction(const Array& params, bool fHelp)
tempKeystore.AddKey(key);
}
}
else if(pwalletMain->IsCrypted())
throw runtime_error("The wallet must be unlocked with walletpassphrase first");
else if(fWalletUnlockMintOnly)
throw JSONRPCError(-102, "Wallet is unlocked for minting only.");
else if(pwalletMain->IsLocked())
throw JSONRPCError(-13, "The wallet must be unlocked with walletpassphrase first");

// Add previous txouts given in the RPC call:
if (params.size() > 1 && params[1].type() != null_type)
Expand Down

0 comments on commit cebaed9

Please sign in to comment.