global: snapshot

This commit is contained in:
nym21
2026-03-15 00:57:53 +01:00
parent 0d177494d9
commit 9e36a4188a
50 changed files with 2765 additions and 1239 deletions

View File

@@ -325,25 +325,33 @@ impl Computer {
.compute(indexer, &self.indexes, &starting_indexes, exit)
})?;
timed("Computed inputs", || {
self.inputs.compute(
indexer,
&self.indexes,
&self.blocks,
&starting_indexes,
exit,
)
})?;
timed("Computed scripts", || {
self.scripts.compute(
indexer,
&self.outputs,
&self.prices,
&starting_indexes,
exit,
)
})?;
// inputs and scripts are independent — parallelize
let (inputs_result, scripts_result) = rayon::join(
|| {
timed("Computed inputs", || {
self.inputs.compute(
indexer,
&self.indexes,
&self.blocks,
&starting_indexes,
exit,
)
})
},
|| {
timed("Computed scripts", || {
self.scripts.compute(
indexer,
&self.outputs,
&self.prices,
&starting_indexes,
exit,
)
})
},
);
inputs_result?;
scripts_result?;
timed("Computed outputs", || {
self.outputs.compute(