update TPC logic in TPCMaster

add a while loop when performing requests. Keep requesting until commit