Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Pallet: Atomic Swap #6349

Merged
merged 21 commits into from
Jun 18, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add docs on ProofLimit
  • Loading branch information
sorpaas committed Jun 16, 2020
commit fa2a85e1ee5c1c84631428d8f052ae51d07abfb9
9 changes: 9 additions & 0 deletions frame/atomic-swap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ pub trait Trait: frame_system::Trait {
/// The currency mechanism.
type Currency: ReservableCurrency<Self::AccountId>;
/// Limit of proof size.
///
/// Atomic swap is only atomic if once the proof is revealed, both parties can submit the proofs
/// on-chain. If A is the one that generates the proof, then it requires that either:
/// - A's blockchain has the same proof length limit as B's blockchain.
/// - Or A's blockchain has shorter proof length limit as B's blockchain.
///
/// If B sees A is on a blockchain with larger proof length limit, then it should kindly refuse
/// to accept the atomic swap request if A generates the proof, and asks that B generates the
/// proof instead.
type ProofLimit: Get<u32>;
/// Block when the swap completely expires.
type ExpireDuration: Get<BlockNumberFor<Self>>;
Expand Down