diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-04-30 10:50:10 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-04-30 10:50:10 +0200 |
commit | 49a52af5e0b1f0ebd0e9a106557e7e1464dc9691 (patch) | |
tree | 6493dadd85f89153ebffdd48b46afadd75eeb46e | |
parent | fd47924ec25359c0e383874cc4cbddaa1d155c29 (diff) |
Add helper to get blocks of IPNS hash
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | src/app.rs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -98,5 +98,9 @@ impl App { }) } + pub async fn blocks_of(&self, ipns: IPNSHash) -> Result<impl Stream<Item = Result<Block, Error>>, Error> { + self.repo.resolve(ipns).await.map(|ipfs| self.blocks(ipfs)) + } + } |