mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-08-25 03:11:21 +00:00
feat: extend ValidityWindow with Unix timestamp bounds
This commit is contained in:
@@ -38,10 +38,21 @@ impl ExecutionState {
|
||||
.iter()
|
||||
.filter_map(|output| output.validity_window.end())
|
||||
.min();
|
||||
let valid_from_ts = program_outputs
|
||||
.iter()
|
||||
.filter_map(|output| output.validity_window.from_timestamp())
|
||||
.max();
|
||||
let valid_until_ts = program_outputs
|
||||
.iter()
|
||||
.filter_map(|output| output.validity_window.to_timestamp())
|
||||
.min();
|
||||
|
||||
let validity_window = (valid_from_id, valid_until_id).try_into().expect(
|
||||
"There should be non empty intersection in the program output validity windows",
|
||||
);
|
||||
let validity_window =
|
||||
(valid_from_id, valid_until_id, valid_from_ts, valid_until_ts)
|
||||
.try_into()
|
||||
.expect(
|
||||
"There should be non empty intersection in the program output validity windows",
|
||||
);
|
||||
|
||||
let mut execution_state = Self {
|
||||
pre_states: Vec::new(),
|
||||
|
||||
Reference in New Issue
Block a user