fix bug when setting node id
This commit is contained in:
parent
67eefbd038
commit
532ef0b9ac
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1248,6 +1248,7 @@ dependencies = [
|
|||||||
"ciborium",
|
"ciborium",
|
||||||
"clap 3.2.25",
|
"clap 3.2.25",
|
||||||
"criterion-plot",
|
"criterion-plot",
|
||||||
|
"futures",
|
||||||
"itertools",
|
"itertools",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
@ -2869,6 +2870,7 @@ dependencies = [
|
|||||||
name = "keyvaluedb-web"
|
name = "keyvaluedb-web"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"async-lock",
|
||||||
"console_log",
|
"console_log",
|
||||||
"flume",
|
"flume",
|
||||||
"futures",
|
"futures",
|
||||||
|
@ -125,7 +125,10 @@ impl TableDB {
|
|||||||
/// Decrypt buffer using decrypt key with nonce prepended to input
|
/// Decrypt buffer using decrypt key with nonce prepended to input
|
||||||
fn maybe_decrypt(&self, data: &[u8]) -> Vec<u8> {
|
fn maybe_decrypt(&self, data: &[u8]) -> Vec<u8> {
|
||||||
if let Some(di) = &self.unlocked_inner.decrypt_info {
|
if let Some(di) = &self.unlocked_inner.decrypt_info {
|
||||||
assert!(data.len() > NONCE_LENGTH);
|
assert!(data.len() >= NONCE_LENGTH);
|
||||||
|
if data.len() == NONCE_LENGTH {
|
||||||
|
return Vec::new();
|
||||||
|
}
|
||||||
|
|
||||||
let mut out = unsafe { unaligned_u8_vec_uninit(data.len() - NONCE_LENGTH) };
|
let mut out = unsafe { unaligned_u8_vec_uninit(data.len() - NONCE_LENGTH) };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user