OK, so the blockchain isn't up to date yet:
x@x:~/.bitcoin$ bitcoind getblockcount
142994
And I can't add an obviously bad address to an account
x@x:~/.bitcoin$ bitcoind setaccount 1badbadbad invalid
error: {"code":-5,"message":"Invalid bitcoin address"}
And I can add a new one:
x@x:~/.bitcoin$ bitcoind getnewaddress
16sVKyzots4SfrEUAoaeHEtJRVjbuhMdFK
x@x:~/.bitcoin$ bitcoind setaccount 16sVKyzots4SfrEUAoaeHEtJRVjbuhMdFK test
But I can also add an address that I don't own to the accounts list (Satoshi's original genesis block, which I obviously don't have the key for):
x@x:~/.bitcoin$ bitcoind setaccount 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa test
x@x:~/.bitcoin$:bitcoind listreceivedbyaddress 0 true
[
{
"address" : "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"account" : "test",
"amount" : 0.00000000,
"confirmations" : 0
}
]
Why doesn't the client throw out addresses that you try to add to the wallet without having the private key for them?