importwallet silently returns no error even if pointed to random file #15019

issue instagibbs opened this issue on December 21, 2018
  1. instagibbs commented at 5:27 PM on December 21, 2018: member

    A confused user was trying to use importwallet on a wallet.dat directly. It gave no error message.

    Perhaps we want an error to be output when nothing is imported, re-iterating that it needs to be a file outputted from dumpwallet?

  2. kristapsk commented at 7:00 PM on December 21, 2018: contributor

    Looks to me too like a bug (from user's perspective) that needs to be fixed.

    $ src/bitcoin-cli -testnet listwallets        
    [
      ""
    ]
    $ src/bitcoin-cli -testnet importwallet dsadas   
    error code: -8
    error message:
    Cannot open wallet dump file
    $ src/bitcoin-cli -testnet importwallet /dev/null
    $ src/bitcoin-cli -testnet listwallets        
    [
      ""
    ]
    
  3. instagibbs commented at 7:07 PM on December 21, 2018: member

    Perhaps it should make sure it sees # Wallet dump created by Bitcoin at the beginning of the file?

  4. kristapsk commented at 7:48 PM on December 21, 2018: contributor

    Perhaps it could check instead if there was something meaningful at all to import and return result, like number of keys imported or warning about nothing imported or something.

  5. fanquake added the label RPC/REST/ZMQ on Dec 22, 2018
  6. willcl-ark commented at 4:11 PM on September 21, 2023: member

    We are not adding new features to the legacy wallet now.

  7. willcl-ark closed this on Sep 21, 2023

  8. bitcoin locked this on Sep 20, 2024

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: 2026-04-13 15:15 UTC

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