mirror of
https://github.com/tlsnotary/tlsn.git
synced 2026-01-09 14:48:13 -05:00
feat(wasm): allow max records config (#810)
This commit is contained in:
@@ -10,6 +10,8 @@ pub struct ProverConfig {
|
||||
pub max_recv_data_online: Option<usize>,
|
||||
pub max_recv_data: usize,
|
||||
pub defer_decryption_from_start: Option<bool>,
|
||||
pub max_sent_records: Option<usize>,
|
||||
pub max_recv_records: Option<usize>,
|
||||
}
|
||||
|
||||
impl From<ProverConfig> for tlsn_prover::ProverConfig {
|
||||
@@ -23,6 +25,14 @@ impl From<ProverConfig> for tlsn_prover::ProverConfig {
|
||||
builder.max_recv_data_online(value);
|
||||
}
|
||||
|
||||
if let Some(value) = value.max_sent_records {
|
||||
builder.max_sent_records(value);
|
||||
}
|
||||
|
||||
if let Some(value) = value.max_recv_records {
|
||||
builder.max_recv_records(value);
|
||||
}
|
||||
|
||||
let protocol_config = builder.build().unwrap();
|
||||
|
||||
let mut builder = tlsn_prover::ProverConfig::builder();
|
||||
|
||||
@@ -7,6 +7,8 @@ use tsify_next::Tsify;
|
||||
pub struct VerifierConfig {
|
||||
pub max_sent_data: usize,
|
||||
pub max_recv_data: usize,
|
||||
pub max_sent_records: Option<usize>,
|
||||
pub max_recv_records: Option<usize>,
|
||||
}
|
||||
|
||||
impl From<VerifierConfig> for tlsn_verifier::VerifierConfig {
|
||||
@@ -16,6 +18,14 @@ impl From<VerifierConfig> for tlsn_verifier::VerifierConfig {
|
||||
builder.max_sent_data(value.max_sent_data);
|
||||
builder.max_recv_data(value.max_recv_data);
|
||||
|
||||
if let Some(value) = value.max_sent_records {
|
||||
builder.max_sent_records(value);
|
||||
}
|
||||
|
||||
if let Some(value) = value.max_recv_records {
|
||||
builder.max_recv_records(value);
|
||||
}
|
||||
|
||||
let validator = builder.build().unwrap();
|
||||
|
||||
tlsn_verifier::VerifierConfig::builder()
|
||||
|
||||
Reference in New Issue
Block a user