when are they checked for double spends or false coins? Is that when the miners put them in the block?
The miner put transactions in the block that are valid for the current blockchain. When an other pool finds a block that makes a transaction invalid, it will be exluded from the next atempt to find a block. Also if 2 or more transaction occour, which invalidates each other (double spend), each miner chooses one to include in his block
Ok, so from the sounds of it, the miners only put valid transactions into the potential block? So I guess the miners check when they put them in the block.
Correct. An block with an invalid tx is an invalid block and a complete waste of the massive amount of work necessary to solve it. An invalid block would be instantly rejected by all other nodes and will never be part of the longest chain.
However miners actually validate txs as soon as they receive them. Actually ALL nodes validate tx as soon as they receive them. Don't use the word "confirm" to mean validate as "confirm" generally is used to indicate a tx that is included in a solved block which has been added to the blockchain and is part of the longest chain.
So a node (any node) receives a tx from its peer. If it is invalid the node discards it. If it is valid it adds it to the memory pool (list of unconfirmed tx) and then relays it to all its peers. Those peers do the same thing (including the independent verification of the tx). Now if the node is also a miner* it will take some tx from the memory pool (all of which are already valid) assemble them into a merkle tree and construct a block header from that. If the block is solved the miner will broadcast the block to other nodes.
When a node receives a new block it validate the block including:
1) all tx in the block are valid
b) the merkle tree and merkle tree root is valid
3) all the information in the block header is valid
4) the block hash meets the difficulty target
Once the node confirms the block is valid it will add the block to the blockchain AND remove the tx included in the block from the memory pool. The node will then relay the block to all of its peers which do the same thing. If the block is ever orphaned the node will add all tx that were in the block back to its memory pool.
Thus all nodes have two "lists"
a) the memory pool = list of valid unconfirmed tx not yet included in a block.
b) the blockchain = linked list of blocks and the confirmed tx they contain.
All nodes follow this sequence (for both txs and blocks)
receive -> validate -> store/update -> relay