bug fixes
This commit is contained in:
@@ -4,6 +4,7 @@ use super::*;
|
||||
use crate::xx::*;
|
||||
use crate::*;
|
||||
use core::convert::TryInto;
|
||||
use crate::routing_table::VersionRange;
|
||||
|
||||
// #[repr(C, packed)]
|
||||
// struct EnvelopeHeader {
|
||||
@@ -271,8 +272,11 @@ impl Envelope {
|
||||
self.version
|
||||
}
|
||||
|
||||
pub fn get_min_max_version(&self) -> (u8, u8) {
|
||||
(self.min_version, self.max_version)
|
||||
pub fn get_min_max_version(&self) -> VersionRange {
|
||||
VersionRange {
|
||||
min: self.min_version,
|
||||
max: self.max_version,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_timestamp(&self) -> u64 {
|
||||
|
@@ -39,7 +39,7 @@ pub const DHT_SIGNATURE_LENGTH_ENCODED: usize = 86;
|
||||
macro_rules! byte_array_type {
|
||||
($name:ident, $size:expr) => {
|
||||
#[derive(Clone, Copy, RkyvArchive, RkyvSerialize, RkyvDeserialize)]
|
||||
#[archive_attr(repr(C), derive(CheckBytes))]
|
||||
#[archive_attr(repr(C), derive(CheckBytes, Hash, Eq, PartialEq, PartialOrd, Ord))]
|
||||
pub struct $name {
|
||||
pub bytes: [u8; $size],
|
||||
pub valid: bool,
|
||||
|
Reference in New Issue
Block a user