Skip to content

Commit

Permalink
feat: add serde on protocol parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
h4sh3d committed Jul 11, 2022
1 parent bda0cc4 commit 4fb3c9b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct ValidatedCoreTransactions<Px, Ti, Pk> {
punish_lock: DataPunishableLock<Ti, Pk>,
}

#[derive(Debug, Clone, Copy, Hash)]
#[derive(Debug, Clone, Copy, Hash, Serialize, Deserialize)]
pub struct CoreArbitratingTransactions<Px> {
/// Partial transaction raw type representing the lock.
pub lock: Px,
Expand All @@ -57,27 +57,27 @@ impl<Px> CoreArbitratingTransactions<Px> {
}
}

#[derive(Debug, Clone, Copy, Hash)]
#[derive(Debug, Clone, Copy, Hash, Serialize, Deserialize)]
pub struct ArbitratingParameters<Amt, Ti, F> {
pub arbitrating_amount: Amt,
pub cancel_timelock: Ti,
pub punish_timelock: Ti,
pub fee_strategy: FeeStrategy<F>,
}

#[derive(Debug, Clone)]
#[derive(Debug, Clone, Copy, Hash, Serialize, Deserialize)]
pub struct TxSignatures<Sig> {
pub sig: Sig,
pub adapted_sig: Sig,
}

#[derive(Debug, Clone)]
#[derive(Debug, Clone, Copy, Hash, Serialize, Deserialize)]
pub struct FullySignedPunish<Px, Sig> {
pub punish: Px,
pub punish_sig: Sig,
}

#[derive(Debug, Clone, Hash)]
#[derive(Debug, Clone, Hash, Serialize, Deserialize)]
pub struct Parameters<Pk, Qk, Rk, Sk, Addr, Ti, F, Pr> {
pub buy: Pk,
pub cancel: Pk,
Expand Down

0 comments on commit 4fb3c9b

Please sign in to comment.