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 12, 2024
1 parent 670a7b6 commit 54f19cd
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 @@ -1516,7 +1516,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);
}
None => {
self.terminal_index.insert(seal, tiny_bset![opout])?;
}
Expand Down

0 comments on commit 54f19cd

Please sign in to comment.