aboutsummaryrefslogtreecommitdiff
path: root/src/i2p.cpp
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2023-01-06 17:41:31 +0100
committerVasil Dimov <vd@FreeBSD.org>2023-01-11 13:56:14 +0100
commit3c1de032de01e551992975eb374465300a655f44 (patch)
tree8c7425b5dfa1375d8932fb028a4729dfdfeb9a5b /src/i2p.cpp
parent801b405f85b413631427c2d8cc1f8447309ea5d8 (diff)
downloadbitcoin-3c1de032de01e551992975eb374465300a655f44.tar.xz
i2p: use consistent number of tunnels with i2pd and Java I2P
The default number of tunnels in the Java implementation is 2 and in the C++ i2pd it is 5. Pick a mid-number (3) and explicitly set it in order to get a consistent behavior with both routers. Do this for persistent sessions which are created once at startup and can be used to open up to ~10 outbound connections and can accept up to ~125 incoming connections. Transient sessions already set number of tunnels to 1. Suggested in: https://github.com/bitcoin/bitcoin/issues/26754#issuecomment-1367356129 https://geti2p.net/en/docs/api/samv3 Alleviates: https://github.com/bitcoin/bitcoin/issues/26754
Diffstat (limited to 'src/i2p.cpp')
-rw-r--r--src/i2p.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/i2p.cpp b/src/i2p.cpp
index e2df6f7e69..802d39d67a 100644
--- a/src/i2p.cpp
+++ b/src/i2p.cpp
@@ -398,7 +398,8 @@ void Session::CreateIfNotCreatedAlready()
const std::string& private_key_b64 = SwapBase64(EncodeBase64(m_private_key));
SendRequestAndGetReply(*sock,
- strprintf("SESSION CREATE STYLE=STREAM ID=%s DESTINATION=%s",
+ strprintf("SESSION CREATE STYLE=STREAM ID=%s DESTINATION=%s "
+ "inbound.quantity=3 outbound.quantity=3",
session_id,
private_key_b64));
}