Skip to content

Commit

Permalink
persistence: fix removed terminal info from index on secret seal re-use
Browse files Browse the repository at this point in the history
Closes #275
  • Loading branch information
dr-orlovsky committed Oct 11, 2024
1 parent 94b5ebc commit f77e76f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/persistence/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,10 @@ impl MemIndex {
.remove(&seal)
.expect("can have zero elements")
{
Some(mut existing_opouts) => existing_opouts.push(opout)?,
Some(mut existing_opouts) => {
existing_opouts.push(opout)?;
let _ = self.terminal_index.insert(seal, existing_opouts);

Check warning on line 1526 in src/persistence/memory.rs

View check run for this annotation

Codecov / codecov/patch

src/persistence/memory.rs#L1524-L1526

Added lines #L1524 - L1526 were not covered by tests
}
None => {
self.terminal_index.insert(seal, tiny_bset![opout])?;
}
Expand Down

0 comments on commit f77e76f

Please sign in to comment.