I am trying to dump and import a private key but I am having strange problems.
I must be making some really silly mistake here:
nud listaccounts
ADDR=`nud getaccountaddress ""`
WIF_KEY=`nud dumpprivkey "$ADDR"`
#Then you stop nud, delete walletB.data and walletS.dat so new ones are created (you can also use another nud instance with a diferent wallet)
nud importprivkey "$WIF_KEY" "imported1"
nud getaccountaddress "imported1" #You get a new, diferent address
echo $ADDR #Check the address for which you exported the WIF private key
#They do not match?
Do they match to you? Here they don’t.
UPDATE:
I ran nud validateaddress $ADDR and it shows that it is valid and that is also in the “imported1” account, but nud getaccountaddress "imported1" only show the new, different address created when importing the WIF key.
So it is somewhere in the wallet but you can not see it in any account. Is this the expected behavior?