Moved a bit more logic into txmempool.cpp