This is a quote from the book "On Zero Confirmation Transactions" by Chris Pacia
...and push the “payment declined” message to the register if such a transaction is detected. Problem solved.

Of course if you have to do this for every mining pool, it can be cumb
ersome, but it doesn’t mean that it wont work as a risk mitigation strategy. If you miss some change in miner policy, you will surely find out about it when someone exploits it, but at least t hat’s only a one-time score. This is mostly what happened to Voorhees’ ShapeShift earlier this year. Miners changed their policy in regards to transaction fees, deleting transactions with fe...
read full book block explorer