Who checks that for a particular transaction, your wallet has sufficient money?
If Person A has to send Person B 5 BitCoins, which process validates that Person A wallet has the required amount for the transaction?
Thanks in advance!
Miners verify transactions and put them in a block they try to mine. This means that every confirmed transaction is checked. So how do they check it?
The blockchain is a ledger that contains all transactions. There you can see when a coin was created and if a coin was spend and to which address it was spend. If there is no further address to which the coin was send, then it is still in the current address.
There is also a list of all addresses that hold unspent Bitcoins, so it is easy to check.
edit: also i think all wallets check if you have sufficient funds.
So basically wallets check whether you have sufficient coins for the transaction or not.
And what miners does is 'validate' the transaction (encrypt the transaction data hash) by calculating crypto-graphic hash functions.
Am I right?
So what extra work do miners? They simply take a bunch of those unconfirmed (but verified through the nodes) transactions flying around and put them in a box (confirming them). Once they are in a box they are considered save and all agreed to it.