aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/protocol.h
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-10-20 13:27:55 -0400
committerRussell Yanofsky <russ@yanofsky.org>2018-03-19 12:05:35 -0400
commit045eeb887092a631d49194e743859b1da84c1d5d (patch)
treef51ebb3d012ec3912ac85e63d8cf68e0146c116c /src/rpc/protocol.h
parentc39dd2ef59c986576726cc356a27165486fd0d65 (diff)
Rename account to label where appropriate
This change only updates strings and adds RPC aliases, but should simplify the implementation of address labels in https://github.com/bitcoin/bitcoin/pull/7729, by getting renaming out of the way and letting it focus on semantics. The difference between accounts and labels is that labels apply only to addresses, while accounts apply to both addresses and transactions (transactions have "from" and "to" accounts). The code associating accounts with transactions is clumsy and unreliable so we would like get rid of it.
Diffstat (limited to 'src/rpc/protocol.h')
-rw-r--r--src/rpc/protocol.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rpc/protocol.h b/src/rpc/protocol.h
index 00b92f1956..ff63bf4901 100644
--- a/src/rpc/protocol.h
+++ b/src/rpc/protocol.h
@@ -76,7 +76,7 @@ enum RPCErrorCode
//! Wallet errors
RPC_WALLET_ERROR = -4, //!< Unspecified problem with wallet (key not found etc.)
RPC_WALLET_INSUFFICIENT_FUNDS = -6, //!< Not enough funds in wallet or account
- RPC_WALLET_INVALID_ACCOUNT_NAME = -11, //!< Invalid account name
+ RPC_WALLET_INVALID_LABEL_NAME = -11, //!< Invalid label name
RPC_WALLET_KEYPOOL_RAN_OUT = -12, //!< Keypool ran out, call keypoolrefill first
RPC_WALLET_UNLOCK_NEEDED = -13, //!< Enter the wallet passphrase with walletpassphrase first
RPC_WALLET_PASSPHRASE_INCORRECT = -14, //!< The wallet passphrase entered was incorrect
@@ -85,6 +85,9 @@ enum RPCErrorCode
RPC_WALLET_ALREADY_UNLOCKED = -17, //!< Wallet is already unlocked
RPC_WALLET_NOT_FOUND = -18, //!< Invalid wallet specified
RPC_WALLET_NOT_SPECIFIED = -19, //!< No wallet specified (error when there are multiple wallets loaded)
+
+ //! Backwards compatible aliases
+ RPC_WALLET_INVALID_ACCOUNT_NAME = RPC_WALLET_INVALID_LABEL_NAME,
};
UniValue JSONRPCRequestObj(const std::string& strMethod, const UniValue& params, const UniValue& id);