Skip to content

Commit

Permalink
fix get root merkle record
Browse files Browse the repository at this point in the history
  • Loading branch information
John Doe committed Jul 11, 2023
1 parent 7a6bde3 commit d37ce0d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,7 @@ impl MongoCollection<MerkleRecord> {
}

pub async fn get_root_merkle_record(&mut self) -> Result<Option<MerkleRecord>, Error> {
let hash = Hash::default();
let mut filter = doc! {};
filter.insert("hash", hash_to_bson(&hash));
let filter = doc! {"_id": Self::get_current_root_object_id()};
let record = self.find_one(filter, None).await?;
Ok(record)
}
Expand Down

0 comments on commit d37ce0d

Please sign in to comment.