Replace processTx with bool flag with two methods