summaryrefslogtreecommitdiff
path: root/include/erebos/pairing.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/erebos/pairing.h')
-rw-r--r--include/erebos/pairing.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/erebos/pairing.h b/include/erebos/pairing.h
index f0952d8..4457426 100644
--- a/include/erebos/pairing.h
+++ b/include/erebos/pairing.h
@@ -17,6 +17,7 @@ using std::function;
using std::future;
using std::map;
using std::mutex;
+using std::promise;
using std::string;
using std::variant;
using std::vector;
@@ -31,7 +32,7 @@ public:
typedef function<void(const Peer &)> RequestInitHook;
void onRequestInit(RequestInitHook);
- typedef function<future<bool>(const Peer &, string)> ConfirmHook;
+ typedef function<future<bool>(const Peer &, string, future<bool> &&)> ConfirmHook;
void onResponse(ConfirmHook);
void onRequest(ConfirmHook);
@@ -72,6 +73,7 @@ private:
StatePhase phase;
vector<uint8_t> nonce;
vector<uint8_t> peerCheck;
+ promise<bool> success;
};
map<Peer, State> peerStates;