Add support for multiple orderings in Provided

Necessary as our Tributary chains needed to agree when a Serai block has
occurred, and when a Monero block has occurred. Since those could happen at the
same time, some validators may put SeraiBlock before ExternalBlock and vice
versa, causing a chain halt. Now they can have distinct ordering queues.
This commit is contained in:
Luke Parker
2023-04-20 07:30:49 -04:00
parent a26ca1a92f
commit 294ad08e00
8 changed files with 79 additions and 43 deletions

View File

@@ -69,7 +69,7 @@ fn empty_block() {
const GENESIS: [u8; 32] = [0xff; 32];
const LAST: [u8; 32] = [0x01; 32];
Block::<NonceTransaction>::new(LAST, vec![], vec![])
.verify(GENESIS, LAST, &[], HashMap::new())
.verify(GENESIS, LAST, HashMap::new(), HashMap::new())
.unwrap();
}
@@ -89,7 +89,7 @@ fn duplicate_nonces() {
let res = Block::new(LAST, vec![], mempool).verify(
GENESIS,
LAST,
&[],
HashMap::new(),
HashMap::from([(<Ristretto as Ciphersuite>::G::identity(), 0)]),
);
if i == 1 {