nim-libp2p-dht/tests
Csaba Kiraly 66116b9bf6
Fix: queue messages when there is no encryption key (#83)
* encodeMessagePacket: expose haskey

encodeMessagePacket checks for session and behaves differently
based on that. Exposing this difference in behavior.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>

* improve tracing of message exchange

run e.g. as
```
nim c -r -d:debug -d:chronicles_enabled=on -d:chronicles_log_level=TRACE -d:chronicles_sinks=textlines[nocolors,stdout] tests/dht/test_providers.nim >err
```

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>

* add debug on Handshake timeour

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>

* queue messages during handshake and send later

If a handshake was already in progress, messages were dropped.
Instead of this, it is better to queue these and send as soon
as the handshake is finished and thus the encryption key is known.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>

* rename handshakeInProgress to keyexchangeInProgress

Handshake is also a name of a message, which makes previous
name less clear.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>

* keyexchangeInProgress: do not remove on handshake received

This is the wrong direction, not needed

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>

---------

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-11-17 11:18:48 -08:00
..
dht Fix changes from stint (#81) 2023-11-17 11:08:45 -08:00
discv5 Fix: queue messages when there is no encryption key (#83) 2023-11-17 11:18:48 -08:00
coverage.nim Remove nimbus build (#73) 2023-07-17 12:43:14 -07:00
coverage.nims Remove nimbus build (#73) 2023-07-17 12:43:14 -07:00
nim.cfg suppress logging noise 2022-09-12 17:13:34 -06:00
testAll.nim Remove nimbus build (#73) 2023-07-17 12:43:14 -07:00
testAllParallel.nim Fix nimble install (#78) 2023-07-21 15:51:42 -06:00