Skip to content

Commit 801b405

Browse files
committed
i2p: lower the number of tunnels for transient sessions
This will lower the load on the I2P network. Since we use one transient session for connecting to just one peer, a higher number of tunnels is unnecessary. This was suggested in: bitcoin/bitcoin#26754 (comment) bitcoin/bitcoin#26754 (comment) The options are documented in: https://geti2p.net/en/docs/protocol/i2cp#options A tunnel is unidirectional, so even if we make a single outbound connection we still need an inbound tunnel to receive the messages sent to us over that connection. Alleviates: bitcoin/bitcoin#26754
1 parent b906b64 commit 801b405

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/i2p.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,9 @@ void Session::CreateIfNotCreatedAlready()
380380
// in the reply in DESTINATION=.
381381
const Reply& reply = SendRequestAndGetReply(
382382
*sock,
383-
strprintf("SESSION CREATE STYLE=STREAM ID=%s DESTINATION=TRANSIENT SIGNATURE_TYPE=7", session_id));
383+
strprintf("SESSION CREATE STYLE=STREAM ID=%s DESTINATION=TRANSIENT SIGNATURE_TYPE=7 "
384+
"inbound.quantity=1 outbound.quantity=1",
385+
session_id));
384386

385387
m_private_key = DecodeI2PBase64(reply.Get("DESTINATION"));
386388
} else {

0 commit comments

Comments
 (0)