I imported a private key from my electrum wallet (testnet) to bitcoincore (testnet) as follow:
- In my electrum wallet, I copy the private key associated to the address mmUToPM2vBb2F1ZNcR86J12GxqAbUJtFCr (balance of 0.06 BTC)
- Then I import it into bitcoincore:
~# bitcoin-cli importprivkey "the 52 characters private key here" "From Electrum Wallet"
- Rescan should be automatic but I ask for a reindex and rescan:
~# bitcoind -rescan -reindex
After a while, I can issue:
~# bitcoin-cli listaddressgroupings
And I successfully get:
[
[
[
"mmUToPM2vBb2F1ZNcR86J12GxqAbUJtFCr",
0.06000000,
"From Electrum Wallet"
]
],
[
[
"2MwBERpNv7JJaW4nVUbQncXjFjG1nFKLYEp",
0.05000000,
"test"
],
[
"2N4AMdXitdYhNdjafzHG61uUdrErExSdhKs",
0.00498305
]
],
[
[
"2N6xTkaeuKsQSHCortgxiNvsVXj2Gv1Qy85",
0.05000000,
"test2"
]
]
]
But when I ask for the balance, it returns 0:
~# bitcoin-cli getbalance mmUToPM2vBb2F1ZNcR86J12GxqAbUJtFCr
0.00000000
How possible is that, considering that the rescan has been performed and that the balance is correct in listaddressgroupings? As a result, I am not able to spend bitcoins from this address.
Thank you for you input/insight!
My bitcoin.conf:
txindex=1
addrindex=1
listen=1
server=1
daemon=1
testnet=1