It seems that we might be able to optimize some transaction checkings.
Many checkings are done twice:
1. when the transaction is placed into the pool
2. when verifying validity of the transaction in a block
Why don't we simply check if the transaction in a block is already in the memory pool? The transaction is already verified when it is placed into the pool.
Does this makes sense? If so, is there a reason that bitcoind does not want to do this?

Thank you very much for your review.