consensus: add some more ltw tests

This commit is contained in:
Boog900 2024-01-19 23:46:24 +00:00
parent 33550735db
commit 0f2ec54c02
No known key found for this signature in database
GPG key ID: 5401367FB7302004
7 changed files with 10847 additions and 11 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,722 @@
[
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
(HardFork::V15, HardFork::V16),
]

View file

@ -4,7 +4,7 @@ use monero_consensus::HFsInfo;
use crate::{
context::{hardforks::HardForkState, HardForkConfig},
tests::{
context::data::hfs::{HFS_2678808_2688888, HFS_2688888_2689608},
context::data::{HFS_2678808_2688888, HFS_2688888_2689608},
mock_db::*,
},
};

View file

@ -1,7 +1,11 @@
use crate::{
context::{weight::BlockWeightsCache, BlockWeightsCacheConfig},
tests::mock_db::*,
context::{
weight::{calculate_block_long_term_weight, BlockWeightsCache},
BlockWeightsCacheConfig,
},
tests::{context::data::BW_2850000_3050000, mock_db::*},
};
use monero_consensus::HardFork;
pub const TEST_WEIGHT_CONFIG: BlockWeightsCacheConfig = BlockWeightsCacheConfig::new(100, 5000);
@ -59,4 +63,32 @@ async fn weight_cache_calculates_correct_median() -> Result<(), tower::BoxError>
Ok(())
}
#[tokio::test]
async fn calc_bw_ltw_2850000_3050000() {
let mut db_builder = DummyDatabaseBuilder::default();
for (weight, ltw) in BW_2850000_3050000.iter().take(100_000) {
let block = DummyBlockExtendedHeader::default().with_weight_into(*weight, *ltw);
db_builder.add_block(block);
}
let mut weight_cache = BlockWeightsCache::init_from_chain_height(
2950000,
TEST_WEIGHT_CONFIG,
db_builder.finish(Some(2950000)),
)
.await
.unwrap();
for (i, (weight, ltw)) in BW_2850000_3050000.iter().skip(100_000).enumerate() {
let calc_ltw = calculate_block_long_term_weight(
&HardFork::V16,
*weight,
weight_cache.median_long_term_weight(),
);
assert_eq!(calc_ltw, *ltw);
weight_cache.new_block((2950000 + i) as u64, *weight, *ltw);
}
}
// TODO: protests

View file

@ -136,7 +136,7 @@ impl Service<DatabaseRequest> for DummyDatabase {
fn call(&mut self, req: DatabaseRequest) -> Self::Future {
let blocks = self.blocks.clone();
let dummy_height = self.dummy_height.clone();
let dummy_height = self.dummy_height;
async move {
Ok(match req {