update_waiting_scheduled_transactions was global