fix(rolldb): fix find wal sequence semantics (#310)
This commit is contained in:
parent
d1ac056142
commit
919529eaa0
1 changed files with 6 additions and 3 deletions
|
|
@ -303,9 +303,12 @@ impl Store {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn find_wal_seq(&self, block: Option<(BlockSlot, BlockHash)>) -> Result<Seq, Error> {
|
||||
pub fn find_wal_seq(
|
||||
&self,
|
||||
block: Option<(BlockSlot, BlockHash)>,
|
||||
) -> Result<Option<Seq>, Error> {
|
||||
if block.is_none() {
|
||||
return Ok(0);
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
let (slot, hash) = block.unwrap();
|
||||
|
|
@ -322,7 +325,7 @@ impl Store {
|
|||
})?;
|
||||
|
||||
match found {
|
||||
Some(DBInt(seq)) => Ok(seq),
|
||||
Some(DBInt(seq)) => Ok(Some(seq)),
|
||||
None => Err(Error::NotFound),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue