I was using bitcoind 0.8.1, on a wallet.dat that was generated long time ago (probably version 0.3.22).
here is what happens:
./bitcoin-0.8.1-linux/bin/64/bitcoind getaddressesbyaccount ""
[
"1Ev4hNhx7XKNyEi9oavr2KGYyd5QJZEpNX",
"19CCQtViGYfBBhG8v7KcjWHu1McdgNRVhg",
"16TkF8gpEdbt3vJufBJ6mRoThiaxnVRPvM",
"1GSanrUFN84tDre3RZepZ3r5PU4JLirE6a",
....
]
./bitcoin-0.8.1-linux/bin/64/bitcoind dumpprivkey 1Ev4hNhx7XKNyEi9oavr2KGYyd5QJZEpNX
error: {"code":-4,"message":"Private key for address 1Ev4hNhx7XKNyEi9oavr2KGYyd5QJZEpNX is not known"}
however if I try the second address:
./bitcoin-0.8.1-linux/bin/64/bitcoind dumpprivkey 19CCQtViGYfBBhG8v7KcjWHu1McdgNRVhg
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
it spits out a private key. Similarly the 3rd address works, but the 4th one gives the same error above.
So in other words, in my wallet.dat there are some addresses to which I do not have the private keys. I noticed this when I sent 10 btcs to the address that starts with 1Ev, and could not see the transaction. Well basically, if I understand this right I do not own this address, right?
So why in the hell "getaddressesbyaccount" tells me that I do? Is this a bug? a feature that I misunderstand?
would appreciate any help.