Skip to content

Commit a7dc992

Browse files
committed
fix accounting for non-witness-output based state
1 parent a3c827d commit a7dc992

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/stockpile.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,16 @@ impl<S: Supply, P: Pile> Stockpile<S, P> {
254254
let Some(seal) = seals.get(&addr.pos) else {
255255
continue;
256256
};
257-
for wid in self.pile_mut().index_mut().get(addr.opid) {
258-
state.insert(addr, Assignment { seal: seal.resolve(wid), data: data.clone() });
257+
if let Some(seal) = seal.to_src() {
258+
state.insert(addr, Assignment { seal, data });
259+
} else {
260+
// We insert a copy of state for each of the witnesses created for the operation
261+
for wid in self.pile_mut().index_mut().get(addr.opid) {
262+
state.insert(addr, Assignment {
263+
seal: seal.resolve(wid),
264+
data: data.clone(),
265+
});
266+
}
259267
}
260268
}
261269
owned.insert(name, state);

0 commit comments

Comments
 (0)