mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 12:49:23 +00:00
Finish binding Tendermint into Tributary and define a Tributary master object
This commit is contained in:
@@ -3,7 +3,7 @@ use std::{
|
||||
collections::{HashSet, HashMap},
|
||||
};
|
||||
|
||||
use rand_core::{RngCore, OsRng};
|
||||
use rand::{RngCore, rngs::OsRng};
|
||||
|
||||
use blake2::{Digest, Blake2s256};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::collections::{HashSet, HashMap};
|
||||
|
||||
use zeroize::Zeroizing;
|
||||
use rand_core::{RngCore, OsRng};
|
||||
use rand::{RngCore, rngs::OsRng};
|
||||
|
||||
use blake2::{Digest, Blake2s256};
|
||||
|
||||
@@ -24,6 +24,7 @@ fn new_blockchain<T: Transaction>(
|
||||
) -> Blockchain<T> {
|
||||
let blockchain = Blockchain::new(genesis, participants);
|
||||
assert_eq!(blockchain.tip(), genesis);
|
||||
assert_eq!(blockchain.block_number(), 0);
|
||||
blockchain
|
||||
}
|
||||
|
||||
@@ -37,6 +38,7 @@ fn block_addition() {
|
||||
blockchain.verify_block(&block).unwrap();
|
||||
assert!(blockchain.add_block(&block).is_ok());
|
||||
assert_eq!(blockchain.tip(), block.hash());
|
||||
assert_eq!(blockchain.block_number(), 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use zeroize::Zeroizing;
|
||||
use rand_core::{RngCore, OsRng};
|
||||
use rand::{RngCore, rngs::OsRng};
|
||||
|
||||
use ciphersuite::{group::ff::Field, Ciphersuite, Ristretto};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use rand_core::{RngCore, OsRng};
|
||||
use rand::{RngCore, rngs::OsRng};
|
||||
|
||||
#[test]
|
||||
fn merkle() {
|
||||
|
||||
@@ -4,7 +4,7 @@ use std::{
|
||||
};
|
||||
|
||||
use zeroize::Zeroizing;
|
||||
use rand_core::{RngCore, CryptoRng};
|
||||
use rand::{RngCore, CryptoRng};
|
||||
|
||||
use blake2::{Digest, Blake2s256};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::collections::{HashSet, HashMap};
|
||||
|
||||
use rand_core::OsRng;
|
||||
use rand::rngs::OsRng;
|
||||
|
||||
use crate::{Transaction, verify_transaction, tests::random_provided_transaction};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::collections::{HashSet, HashMap};
|
||||
|
||||
use rand_core::OsRng;
|
||||
use rand::rngs::OsRng;
|
||||
|
||||
use blake2::{Digest, Blake2s256};
|
||||
|
||||
@@ -13,7 +13,7 @@ use crate::{
|
||||
|
||||
#[test]
|
||||
fn serialize_signed() {
|
||||
let signed = random_signed(&mut rand_core::OsRng);
|
||||
let signed = random_signed(&mut rand::rngs::OsRng);
|
||||
assert_eq!(Signed::read::<&[u8]>(&mut signed.serialize().as_ref()).unwrap(), signed);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user