enforce valid window construction

This commit is contained in:
Sergio Chouhy
2026-03-20 13:49:17 -03:00
parent 607a34058d
commit 3257440448
9 changed files with 119 additions and 63 deletions
@@ -19,18 +19,15 @@ fn main() {
let post = pre.account.clone();
let mut output = ProgramOutput::new(
let output = ProgramOutput::new(
instruction_words,
vec![pre],
vec![AccountPostState::new(post)],
);
if let Some(id) = from_id {
output = output.valid_from_id(id);
}
if let Some(id) = until_id {
output = output.valid_until_id(id);
}
)
.valid_from_id(from_id)
.unwrap()
.valid_until_id(until_id)
.unwrap();
output.write();
}