| 355 | |
| 356 | |
| 357 | CTxDestination GetAccountDestination(CWallet* const pwallet, std::string strAccount, bool bForceNew=false) |
| 358 | { |
| 359 | CPubKey pubKey; |
| 360 | if (!pwalletMain->GetAccountPubkey(pubKey, strAccount, bForceNew)) { |
| 361 | throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); |
| 362 | } |
| 363 | |
| 364 | CTxDestination dest; |
| 365 | if (!pwallet->GetAccountDestination(dest, strAccount, bForceNew)) { |
| 366 | throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); |
| 367 | } |
| 368 | |
| 369 | return dest; |
| 370 | } |
| 371 | |
| 372 | UniValue getaccountaddress(const UniValue& params, bool fHelp) |
| 373 | { |
no test coverage detected