AleoNet / snarkOS

A Decentralized Operating System for ZK Applications
http://snarkos.org
Apache License 2.0
4.1k stars 2.57k forks source link

Avoid unnecessary calculations in propose_batch #3265

Closed elderhammer closed 1 month ago

elderhammer commented 1 month ago

Determine in advance whether the proposal has expired. If it expires, return directly and skip the subsequent process.

elderhammer commented 1 month ago

Interesting find. Perhaps the following should also be moved up for consistency:

// Ditto if the batch had already been proposed and not expired.
ensure!(round > 0, "Round 0 cannot have transaction batches");

Done.