mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-11 05:29:25 +00:00
Bug fixes and log statements
Also shims next nonce code with a fine-for-now piece of code which is unviable in production, yet should survive testnet.
This commit is contained in:
@@ -20,6 +20,10 @@ mod dkg;
|
||||
mod handle_p2p;
|
||||
mod sync;
|
||||
|
||||
fn random_u16<R: RngCore>(rng: &mut R) -> u16 {
|
||||
u16::try_from(rng.next_u64() >> 48).unwrap()
|
||||
}
|
||||
|
||||
fn random_u32<R: RngCore>(rng: &mut R) -> u32 {
|
||||
u32::try_from(rng.next_u64() >> 32).unwrap()
|
||||
}
|
||||
@@ -77,6 +81,7 @@ fn serialize_transaction() {
|
||||
|
||||
test_read_write(Transaction::DkgShares(
|
||||
random_u32(&mut OsRng),
|
||||
Participant::new(random_u16(&mut OsRng).saturating_add(1)).unwrap(),
|
||||
shares,
|
||||
random_signed(&mut OsRng),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user