From fe7000123e4c7dbed458f6123a654fa9fb3c0107 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Sun, 29 Oct 2017 18:30:10 -0700 Subject: discovery key helper on sleep dir --- src/sleep_register.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sleep_register.rs b/src/sleep_register.rs index 668bb62..3e1c48e 100644 --- a/src/sleep_register.rs +++ b/src/sleep_register.rs @@ -12,6 +12,7 @@ use rand::{OsRng, Rng}; use errors::*; use sleep_file::*; +use protocol::make_discovery_key; /// Abstract access to Hypercore register pub trait HyperRegister { @@ -362,6 +363,10 @@ impl SleepDirRegister { sf.check()?; Ok(sf) } + + pub fn discovery_key(&self) -> Vec { + make_discovery_key(&self.pub_key) + } } impl HyperRegister for SleepDirRegister { -- cgit v1.2.3