title: How do bitcoin miners check for double-spend or over-spend?
body: <p>The only way i can visualize the process is: search the blockchain for all the transactions that have the same source address as the transaction being processed, add them all up (including the trx being processed) to verify they add up to less than or equal to the source transaction  amount.</p>
  
  <p>Doing this for every bitcoin transaction sounds horribly inefficient.</p>
  
  <p>How do they really do it?</p>