Integration test for nested LP registration
- move `LpTransport` trait definition to shared `nym-lp-transport` crate - make transport layer within `LpConnectionHandler` generic with respect to the forwarding target. it must, however, use the same type as the incoming client connection - extracted explicit `LpConnectionHandler::establish_exit_stream` to more easily modify it in the future to fully protect the channel and disallow using untrusted egress points - fix additional log-string interpolation nits
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
use rand::Rng;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt::Debug;
|
||||
use thiserror::Error;
|
||||
use time::{Date, OffsetDateTime};
|
||||
|
||||
@@ -73,7 +74,7 @@ pub struct CredentialSigningData {
|
||||
pub ticketbook_type: TicketType,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
|
||||
#[derive(Serialize, Deserialize, PartialEq, Clone)]
|
||||
pub struct CredentialSpendingData {
|
||||
pub payment: Payment,
|
||||
|
||||
@@ -86,6 +87,20 @@ pub struct CredentialSpendingData {
|
||||
pub epoch_id: u64,
|
||||
}
|
||||
|
||||
impl Debug for CredentialSpendingData {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
// we're redacting the payment not since it contains secret,
|
||||
// but because it's producing a lot of noise in the output and
|
||||
// we are not really interested in coordinates of each of the attached curve points
|
||||
f.debug_struct("CredentialSpendingData")
|
||||
.field("payment", &"[REDACTED]")
|
||||
.field("pay_info", &self.pay_info)
|
||||
.field("spend_date", &self.spend_date)
|
||||
.field("epoch_id", &self.epoch_id)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl CredentialSpendingData {
|
||||
pub fn verify(&self, verification_key: &VerificationKeyAuth) -> Result<(), CompactEcashError> {
|
||||
self.payment.spend_verify(
|
||||
|
||||
Reference in New Issue
Block a user