Skip to content

Commit

Permalink
DatabaseStore::from_ls2()
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed Jul 14, 2019
1 parent 54ebfce commit 51281c3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/i2np/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,15 @@ impl DatabaseStore {
data: DatabaseStoreData::LS(ls),
}
}

pub fn from_ls2(ls2: LeaseSet2, reply: Option<ReplyPath>) -> Self {
DatabaseStore {
key: ls2.header.dest.hash(),
ds_type: constants::NETDB_STORE_LS2,
reply,
data: DatabaseStoreData::LS2(ls2),
}
}
}

#[cfg_attr(tarpaulin, skip)]
Expand Down

0 comments on commit 51281c3

Please sign in to comment.