Skip to content

detect empty wallet or create new wallet #40

@scravy

Description

@scravy

From a comment in #37

[We are] trying to use as much bitcoin functionality as possible. Bitcoins CWallet already has methods to set the master key but I do suspect it was not their intention for them to be used /after/ a wallet has been created already. When the node comes up it automatically creates a wallet. Upon creation the wallet is preseeded with a list of reserve keys. It is thus tricky to distinguish a newly created wallet from a wallet which is already in use. Nevertheless you could import a new masterkey into an already used wallet, which is why setting a new masterkey will automatically backup your existing wallet (although in most cases this will be an empty wallet).

Ways to solve this:

  • create and open a completely new wallet
  • detect whether current wallet is used, if used -> fail, of not used -> replace master key

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions