-/*
-Deletes the transaction table entry for the given request and returns the deleted xapp's address and port for reference.
-Returns error in case the transaction cannot be found.
-*/
-func (t *Tracker) complete_transaction(subID uint16, act Action) (*string, *uint16, error){
- key := Transaction_key{subID, act}
- if xact, ok := t.transaction_table[key]; ok {
- delete(t.transaction_table, key)
- return &(xact.Xapp_instance_address), &(xact.Xapp_port), nil
+func (t *Tracker) UnTrackTransaction(xappKey TransactionXappKey) (*Transaction, error) {
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
+ if trans, ok2 := t.transactionXappTable[xappKey]; ok2 {
+ delete(t.transactionXappTable, xappKey)
+ return trans, nil