How does a Bitcoin client know its transaction has been accepted by the whole network? Say Belly, Alice and Teddy are Bitcoin clients.


Belly makes a transaction to send 1 btc to Alice.
He broadcasts this transaction to the P2P network.
Teddy calculates a valid hashcode and add Belly's transaction into his block chain.


Then here is the question. How does Belly know his transaction has been accepted? Even he knows Teddy has added it into his block chain, this block chain can be rejected later if there is a longer block chain on the network, right? And what if Teddy is malicious and lying?

I heard you need to wait until 6 clients accept your transaction. I'm not sure what this exactly means. And why 6, not 5 or 7?
6 blocks, not 6 clients. The chances of catching up to the block with the transactions that is buried 6 blocks deep is slim. Granted of course that the dishonest party has not a very significant part (say less than 15% or so) of the hashing power. These changes can be calculated using Poisson distribution, as done in Satoshi's original paper (last pages).