Skip to content

Commit 54f19cd

Browse files
committed
persistence: fix removed terminal info from index on secret seal re-use
Closes #275
1 parent 670a7b6 commit 54f19cd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/persistence/memory.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,10 @@ impl MemIndex {
15161516
.remove(&seal)
15171517
.expect("can have zero elements")
15181518
{
1519-
Some(mut existing_opouts) => existing_opouts.push(opout)?,
1519+
Some(mut existing_opouts) => {
1520+
existing_opouts.push(opout)?;
1521+
let _ = self.terminal_index.insert(seal, existing_opouts);
1522+
}
15201523
None => {
15211524
self.terminal_index.insert(seal, tiny_bset![opout])?;
15221525
}

0 commit comments

Comments
 (0)