From 91431007487fc810f000174ac3562fb0eec262fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Thu, 18 Mar 2021 17:13:46 -0400
Subject: [PATCH] contrib: update opendht

Change-Id: I9273985b6c6156e6e5a39388cdf32ed48fccd58d
---
 contrib/src/opendht/SHA512SUMS   | 2 +-
 contrib/src/opendht/package.json | 2 +-
 contrib/src/opendht/rules.mak    | 4 ++--
 src/jamidht/account_manager.cpp  | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/src/opendht/SHA512SUMS b/contrib/src/opendht/SHA512SUMS
index c3c03f35b8..d6400692c8 100644
--- a/contrib/src/opendht/SHA512SUMS
+++ b/contrib/src/opendht/SHA512SUMS
@@ -1 +1 @@
-9966432d12fcfebc6b14fe9eed724d693aa753e0cff352a810bfe812609014da506011b500e9323a40b136716319e81656a8cf01d8f462c2ad294aa78d5482b8  opendht-e6c760ec6b3b771221956c3de22eb875b548908f.tar.gz
\ No newline at end of file
+948a4a0ede624d7604535040e88d74a559b9fd6d8509d5e98d2595110cfc810b1f062b3efca26cdf8b24ef79bdfeaca7c656d4c6b0a6536b5261da01c07a6cbc  opendht-2.2.0rc2.tar.gz
\ No newline at end of file
diff --git a/contrib/src/opendht/package.json b/contrib/src/opendht/package.json
index ad442e971e..defbb88e04 100644
--- a/contrib/src/opendht/package.json
+++ b/contrib/src/opendht/package.json
@@ -1,6 +1,6 @@
 {
     "name": "opendht",
-    "version": "e6c760ec6b3b771221956c3de22eb875b548908f",
+    "version": "2.2.0rc2",
     "url": "https://github.com/savoirfairelinux/opendht/archive/__VERSION__.tar.gz",
     "deps": [
         "argon2",
diff --git a/contrib/src/opendht/rules.mak b/contrib/src/opendht/rules.mak
index 1204319153..4f32b0c7fd 100644
--- a/contrib/src/opendht/rules.mak
+++ b/contrib/src/opendht/rules.mak
@@ -1,9 +1,9 @@
 # OPENDHT
-OPENDHT_VERSION := e6c760ec6b3b771221956c3de22eb875b548908f
+OPENDHT_VERSION := 2.2.0rc2
 OPENDHT_URL := https://github.com/savoirfairelinux/opendht/archive/$(OPENDHT_VERSION).tar.gz
 
 PKGS += opendht
-ifeq ($(call need_pkg,'opendht >= 2.1.4'),)
+ifeq ($(call need_pkg,'opendht >= 2.2.0'),)
 PKGS_FOUND += opendht
 endif
 
diff --git a/src/jamidht/account_manager.cpp b/src/jamidht/account_manager.cpp
index 2cfbd9d786..48da2417f3 100644
--- a/src/jamidht/account_manager.cpp
+++ b/src/jamidht/account_manager.cpp
@@ -524,7 +524,7 @@ AccountManager::sendTrustRequest(const std::string& to, const std::vector<uint8_
                   dev.toString().c_str());
         dht_->putEncrypted(dht::InfoHash::get("inbox:" + dev.toString()),
                            dev,
-                           dht::TrustRequest(DHT_TYPE_NS, payload));
+                           dht::TrustRequest(DHT_TYPE_NS, "", payload));
     });
 }
 
-- 
GitLab