Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify default account naming policy. #253

Merged
merged 1 commit into from
May 1, 2015

Conversation

jrick
Copy link
Member

@jrick jrick commented Apr 23, 2015

Must be merged together with btcsuite/btcd#399.

@jrick jrick force-pushed the jrick_default_account_name branch 2 times, most recently from e413e39 to 946ae44 Compare April 25, 2015 04:47
@jrick jrick mentioned this pull request Apr 27, 2015
@jrick jrick force-pushed the jrick_default_account_name branch 2 times, most recently from 3ad8e17 to 09769e7 Compare May 1, 2015 05:01
@jrick
Copy link
Member Author

jrick commented May 1, 2015

rebased

}
)
// isReservedAccountName returns true if the account name is reserved. Reserved
// accounts may never be renamed, and other account may not be renamed to a
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accounts

@davecgh
Copy link
Member

davecgh commented May 1, 2015

Other than the accounts typo and conversion to *btjcjson.RPCError which you did while I was reviewing, looks good.

OK after that typo fix and squash. I'll merge btcsuite/btcd#399 as well. It's ready too.

@jrick
Copy link
Member Author

jrick commented May 1, 2015

Travis will fail this one since btcsuite/btcd#399 isn't in yet.

@jrick jrick force-pushed the jrick_default_account_name branch from ccb8911 to ec6034e Compare May 1, 2015 05:27
Rather than disallowing the default account to be renamed as was
proposed in btcsuite#245 (and implemented in btcsuite#246), the default account name
is no longer considered a reserved name by the address manager.
Instead, it is simply the initial name used for the first initial
account.

A database upgrade removes any additional aliases for the default
account in the database.  This prevents a lookup for some name which
is not an account name from mapping to the default account
unexpectedly (potentially preventing incorrect account usage from the
RPC server due to bad iteraction with default parameters).

All unset account names in a JSON-RPC request are expected to be set
nil by btcjson.  This behavior depends on btcsuite/btcd#399.

Additionally, the manager no longer considers the wildcard * to be a
reserved account name.  Due to poor API decisions, the RPC server
overloads the meaning of account fields to optionally allow referring
to all accounts at a time, or a single account.  This is not a address
manager responsibility, though, as a future cleaner API should not use
multiple differet meanings for the same field across multiple
requests.  Therefore, don't burden down future APIs with this quirk
and prevent incorrect wildcard usage from the RPC server.

Closes btcsuite#245.
@conformal-deploy conformal-deploy merged commit ec6034e into btcsuite:master May 1, 2015
@jrick jrick deleted the jrick_default_account_name branch May 1, 2015 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants