Wallet file should not be reused across chains #12805

issue MarcoFalke openend this issue on March 27, 2018
  1. MarcoFalke commented at 10:47 pm on March 27, 2018: member

    Now that it is possible to specify a full path for the wallet (or a walletdir), the same wallet file is happily reused even when switching chains.

    Imo that use case has no purpose, since all transactions on one chain are invalid on the other. It might be better to return an InitError in that case than writing useless data to a wallet file of a different chain.

  2. MarcoFalke added the label Wallet on Mar 27, 2018
  3. ryanofsky commented at 2:09 pm on March 28, 2018: member

    It might be possible to prevent this by looking at best block value in the wallet database, and triggering an error if the genesis block referenced there doesn’t match the current chain:

    https://github.com/bitcoin/bitcoin/blob/0d8fc8de076d1447df63f4d348a19732f5a0d31e/src/chain.cpp#L35

  4. MarcoFalke added the label good first issue on Apr 1, 2018
  5. MarcoFalke removed the label good first issue on Apr 1, 2018
  6. achow101 referenced this in commit 606ce05ec2 on Apr 28, 2022
  7. prusnak commented at 8:46 pm on April 28, 2022: contributor
    Should this be closed now that #18554 has been merged?
  8. achow101 closed this on Apr 28, 2022

  9. sidhujag referenced this in commit 64fa7c2c9c on Apr 29, 2022
  10. DrahtBot locked this on Apr 28, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me