Merge branch 'master' into tracing-once
This commit is contained in:
commit
f5b0fc3556
|
@ -3,12 +3,8 @@ pub mod error;
|
||||||
use error::Error;
|
use error::Error;
|
||||||
|
|
||||||
use crate::MixMessage;
|
use crate::MixMessage;
|
||||||
// TODO: Remove all the mock below once the actual implementation is integrated to the system.
|
|
||||||
//
|
|
||||||
/// A mock implementation of the Sphinx encoding.
|
|
||||||
|
|
||||||
const NODE_ID_SIZE: usize = 32;
|
const NODE_ID_SIZE: usize = 32;
|
||||||
|
|
||||||
// TODO: Move MAX_PAYLOAD_SIZE and MAX_LAYERS to the upper layer (service layer).
|
// TODO: Move MAX_PAYLOAD_SIZE and MAX_LAYERS to the upper layer (service layer).
|
||||||
const MAX_PAYLOAD_SIZE: usize = 2048;
|
const MAX_PAYLOAD_SIZE: usize = 2048;
|
||||||
const PAYLOAD_PADDING_SEPARATOR: u8 = 0x01;
|
const PAYLOAD_PADDING_SEPARATOR: u8 = 0x01;
|
||||||
|
@ -17,6 +13,7 @@ const MAX_LAYERS: usize = 5;
|
||||||
pub const MESSAGE_SIZE: usize =
|
pub const MESSAGE_SIZE: usize =
|
||||||
NODE_ID_SIZE * MAX_LAYERS + MAX_PAYLOAD_SIZE + PAYLOAD_PADDING_SEPARATOR_SIZE;
|
NODE_ID_SIZE * MAX_LAYERS + MAX_PAYLOAD_SIZE + PAYLOAD_PADDING_SEPARATOR_SIZE;
|
||||||
|
|
||||||
|
/// A mock implementation of the Sphinx encoding.
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct MockMixMessage;
|
pub struct MockMixMessage;
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ impl StorageTransaction for Transaction {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Rocks storage backend
|
/// Rocks storage backend
|
||||||
|
|
||||||
pub struct RocksBackend<SerdeOp> {
|
pub struct RocksBackend<SerdeOp> {
|
||||||
rocks: Arc<DB>,
|
rocks: Arc<DB>,
|
||||||
_serde_op: PhantomData<SerdeOp>,
|
_serde_op: PhantomData<SerdeOp>,
|
||||||
|
|
Loading…
Reference in New Issue