---
title: llarp::dht::TXHolder

---

# llarp::dht::TXHolder



 [More...](#detailed-description)

## Public Types

|                | Name           |
| -------------- | -------------- |
| using std::unique_ptr< [TX](Classes/structllarp_1_1dht_1_1TX.md)< K, V > > | **[TXPtr](Classes/structllarp_1_1dht_1_1TXHolder.md#using-txptr)**  |

## Public Functions

|                | Name           |
| -------------- | -------------- |
| const [TX](Classes/structllarp_1_1dht_1_1TX.md)< K, V > * | **[GetPendingLookupFrom](Classes/structllarp_1_1dht_1_1TXHolder.md#function-getpendinglookupfrom)**(const [TXOwner](Classes/structllarp_1_1dht_1_1TXOwner.md) & owner) const |
| util::StatusObject | **[ExtractStatus](Classes/structllarp_1_1dht_1_1TXHolder.md#function-extractstatus)**() const |
| bool | **[HasLookupFor](Classes/structllarp_1_1dht_1_1TXHolder.md#function-haslookupfor)**(const K & target) const |
| bool | **[HasPendingLookupFrom](Classes/structllarp_1_1dht_1_1TXHolder.md#function-haspendinglookupfrom)**(const [TXOwner](Classes/structllarp_1_1dht_1_1TXOwner.md) & owner) const |
| void | **[NewTX](Classes/structllarp_1_1dht_1_1TXHolder.md#function-newtx)**(const [TXOwner](Classes/structllarp_1_1dht_1_1TXOwner.md) & askpeer, const [TXOwner](Classes/structllarp_1_1dht_1_1TXOwner.md) & whoasked, const K & k, [TX](Classes/structllarp_1_1dht_1_1TX.md)< K, V > * t, llarp_time_t requestTimeoutMS =15s) |
| void | **[NotFound](Classes/structllarp_1_1dht_1_1TXHolder.md#function-notfound)**(const [TXOwner](Classes/structllarp_1_1dht_1_1TXOwner.md) & from, const std::unique_ptr< [Key_t](Classes/structllarp_1_1dht_1_1Key__t.md) > & next)<br>mark tx as not fond  |
| void | **[Found](Classes/structllarp_1_1dht_1_1TXHolder.md#function-found)**(const [TXOwner](Classes/structllarp_1_1dht_1_1TXOwner.md) & from, const K & k, const std::vector< V > & values) |
| void | **[Inform](Classes/structllarp_1_1dht_1_1TXHolder.md#function-inform)**([TXOwner](Classes/structllarp_1_1dht_1_1TXOwner.md) from, K key, std::vector< V > values, bool sendreply =false, bool removeTimeouts =true)<br>inform all watches for key of values found  |
| void | **[Expire](Classes/structllarp_1_1dht_1_1TXHolder.md#function-expire)**(llarp_time_t now) |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| std::unordered_multimap< K, [TXOwner](Classes/structllarp_1_1dht_1_1TXOwner.md) > | **[waiting](Classes/structllarp_1_1dht_1_1TXHolder.md#variable-waiting)**  |
| std::unordered_map< K, llarp_time_t > | **[timeouts](Classes/structllarp_1_1dht_1_1TXHolder.md#variable-timeouts)**  |
| std::unordered_map< [TXOwner](Classes/structllarp_1_1dht_1_1TXOwner.md), TXPtr > | **[tx](Classes/structllarp_1_1dht_1_1TXHolder.md#variable-tx)**  |

## Detailed Description

```cpp
template <typename K ,
typename V >
struct llarp::dht::TXHolder;
```

## Public Types Documentation

### using TXPtr

```cpp
using llarp::dht::TXHolder< K, V >::TXPtr =  std::unique_ptr<TX<K, V> >;
```


## Public Functions Documentation

### function GetPendingLookupFrom

```cpp
const TX< K, V > * GetPendingLookupFrom(
    const TXOwner & owner
) const
```


### function ExtractStatus

```cpp
inline util::StatusObject ExtractStatus() const
```


### function HasLookupFor

```cpp
inline bool HasLookupFor(
    const K & target
) const
```


### function HasPendingLookupFrom

```cpp
inline bool HasPendingLookupFrom(
    const TXOwner & owner
) const
```


### function NewTX

```cpp
void NewTX(
    const TXOwner & askpeer,
    const TXOwner & whoasked,
    const K & k,
    TX< K, V > * t,
    llarp_time_t requestTimeoutMS =15s
)
```


### function NotFound

```cpp
void NotFound(
    const TXOwner & from,
    const std::unique_ptr< Key_t > & next
)
```

mark tx as not fond 

### function Found

```cpp
inline void Found(
    const TXOwner & from,
    const K & k,
    const std::vector< V > & values
)
```


### function Inform

```cpp
void Inform(
    TXOwner from,
    K key,
    std::vector< V > values,
    bool sendreply =false,
    bool removeTimeouts =true
)
```

inform all watches for key of values found 

### function Expire

```cpp
void Expire(
    llarp_time_t now
)
```


## Public Attributes Documentation

### variable waiting

```cpp
std::unordered_multimap< K, TXOwner > waiting;
```


### variable timeouts

```cpp
std::unordered_map< K, llarp_time_t > timeouts;
```


### variable tx

```cpp
std::unordered_map< TXOwner, TXPtr > tx;
```


-------------------------------

Updated on 2023-02-01 at 20:39:32 +0000