checkpoint
This commit is contained in:
@@ -117,7 +117,7 @@ impl RPCOperation {
|
||||
|
||||
pub fn decode(
|
||||
operation_reader: &veilid_capnp::operation::Reader,
|
||||
opt_sender_node_id: Option<&PublicKey>,
|
||||
opt_sender_node_id: Option<&TypedKey>,
|
||||
) -> Result<Self, RPCError> {
|
||||
let op_id = OperationId::new(operation_reader.get_op_id());
|
||||
|
||||
|
@@ -2,7 +2,7 @@ use super::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationFindBlockQ {
|
||||
pub block_id: PublicKey,
|
||||
pub block_id: TypedKey,
|
||||
}
|
||||
|
||||
impl RPCOperationFindBlockQ {
|
||||
|
@@ -2,7 +2,7 @@ use super::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RPCOperationFindNodeQ {
|
||||
pub node_id: PublicKey,
|
||||
pub node_id: TypedKey,
|
||||
}
|
||||
|
||||
impl RPCOperationFindNodeQ {
|
||||
|
@@ -39,9 +39,9 @@ pub fn decode_peer_info(
|
||||
.reborrow()
|
||||
.get_signed_node_info()
|
||||
.map_err(RPCError::protocol)?;
|
||||
let node_ids = Vec::with_capacity(nids_reader.len() as usize);
|
||||
let node_ids = TypedKeySet::with_capacity(nids_reader.len() as usize);
|
||||
for nid_reader in nids_reader.iter() {
|
||||
node_ids.push(decode_typed_key(&nid_reader)?);
|
||||
node_ids.add(decode_typed_key(&nid_reader)?);
|
||||
}
|
||||
let signed_node_info = decode_signed_node_info(&sni_reader, crypto, &node_ids)?;
|
||||
|
||||
|
@@ -67,10 +67,10 @@ pub fn decode_signed_relayed_node_info(
|
||||
.reborrow()
|
||||
.get_relay_ids()
|
||||
.map_err(RPCError::protocol)?;
|
||||
let mut relay_ids = Vec::with_capacity(rids_reader.len() as usize);
|
||||
let mut relay_ids = TypedKeySet::with_capacity(rids_reader.len() as usize);
|
||||
for rid_reader in rids_reader {
|
||||
let relay_id = decode_typed_key(&rid_reader)?;
|
||||
relay_ids.push(relay_id);
|
||||
relay_ids.add(relay_id);
|
||||
}
|
||||
|
||||
let ri_reader = reader
|
||||
|
Reference in New Issue
Block a user