< addressleakt>
I have a wallet that I have used for a while, it has legacy, p2sh-segwit and bech32 addresses in it.
< addressleakt>
I do a "bitcoin-cli dumpwallet wallet.txt" and I get a 300 MB file which seems to contain all addresses.
< addressleakt>
Reading the manual I got the impression that importwallet would be the command to use to import this wallet-dump. So on a different Bitcoin Core I do "bitcoin-cli importwallet wallet.txt", I then do a dumpwallet on this new node to verify that the wallet have imported all the addresses correctly.
< addressleakt>
But it seems it has only imported the legacy addresses (starting with 1), in the original dumpwallet file the p2sh-segwit addresses starting with a 3 are found two times, but this new walletdump seems to only have the p2sh addresses on one line with the script=1 in it.
< addressleakt>
Bech32 addresses are not imported at all with importwallet.
< sipa>
addressleakt: try calling getaddressinfo on one of the bech32 addresses
< sipa>
there are a lot of weird things about importing and dumping, but generally, the wallet will recognize payments to any form of address for any of the keys it has
< sipa>
so even if you import a private key listed for a p2pkh address, it will also import the p2wpkh and p2sh versions of it
< addressleakt>
"ismine": true,
< sipa>
getaddressinfo will really tell you whether it's treated as yours
< addressleakt>
So it is there..
< sipa>
good.
< addressleakt>
it says the same if i try it on a 2sh-segwit (3xx) address, ismine is true. but also some extra stuff
< addressleakt>
So importwallet works fine with all kinds of segwit addresses?
< sipa>
in reality, importwallet just imports keys
< sipa>
the wallet currently can't distinguish between a key for one kind of address vs another
< sipa>
which is a problem for a number of reasons
< sipa>
but it is the more conservative behavior
< addressleakt>
will it detect coins sent to the addresses?
< addressleakt>
listunspent for example
< addressleakt>
and can it spend them? :)
< addressleakt>
if that all should work then im happy
< sipa>
yes, the "ismine" property tells you whether payments to that address are recognized
< sipa>
does dumpprivkey on that bech32 address work too?
< addressleakt>
yes, it shows the same value as in the dump file
< addressleakt>
very good
< addressleakt>
Thank you very much! You are a legend.
< addressleakt>
Now maybe i can export it like that, remove the addresses i dont need and importwallet into a new one so i dont have a 3.1 GB wallet.dat file...
< promag>
IMO either we merge this in this early stage, or postpone after 0.18
< bitcoin-git>
[bitcoin] ken2812221 closed pull request #14489: refactor: Drop boost::thread and boost::chrono (master...interruptible-thread) https://github.com/bitcoin/bitcoin/pull/14489
< stevenroose>
kallewoof: you here?
< joiflores>
Hi
< joiflores>
I don
< joiflores>
I know this channel is to discuss Bitcoin development, I am not a developer but I would like to talk with some developer about an issue
< phantomcircuit>
joiflores, no
< joiflores>
:(
< molz>
joiflores, you can talk about your issue in channel #bitcoin, let's hear it there
< joiflores>
thank you
< bitcoin-git>
[bitcoin] DrahtBot closed pull request #13168: Thread names in logs and deadlock debug tools (take 2) (master...2018-05-threadnames-take-2) https://github.com/bitcoin/bitcoin/pull/13168
< bitcoin-git>
[bitcoin] MarcoFalke closed pull request #14231: travis: Save cache even when build or test fail (master...travis-save-cache-on-error) https://github.com/bitcoin/bitcoin/pull/14231
< luke-jr>
fixing getbalance last I checked, but I'm about to fly
< bitcoin-git>
[bitcoin] dongcarl opened pull request #14861: tests: Modify rpc_bind to conform to #14532 behaviour. (master...2018-12-fix-rpc-bind-tests) https://github.com/bitcoin/bitcoin/pull/14861
< MarcoFalke>
luke-jr: They needed rebase (both on master and 0.17), so I moved them to 0.17.2 for now
< MarcoFalke>
I don't have a strong opinion on those, but it seems rushed to push them into 0.17.1
< luke-jr>
frankly seems like it should have been a blocker for 0.17.0 :/
< MarcoFalke>
Agree that it would've been nicer if the issue was found earlier, but can't undo that now
< MarcoFalke>
I think there is some disagreement on how to fix the issue exactly and there seems to be more risk in fixing it rushed than postponing it to 0.17.2
< MarcoFalke>
We'd just preserve the behavior from 0.17.0 to 0.17.1, so at least it isn't getting worse
< luke-jr>
true
< MarcoFalke>
sipa: #14780 needs rebase. Is there a downside in moving it to 0.17.2?
< bitcoin-git>
[bitcoin] MarcoFalke opened pull request #14863: refactor: Add and use HaveTxsDownloaded() where appropriate (master...Mf1812-docNchainTx) https://github.com/bitcoin/bitcoin/pull/14863