+ revoked_commitment: Arc::new(Mutex::new(INITIAL_REVOKED_COMMITMENT_NUMBER)),
+ disable_revocation_policy_check: false
+ }
+ }
+
+ /// Construct an EnforcingSigner with externally managed storage
+ ///
+ /// Since there are multiple copies of this struct for each channel, some coordination is needed
+ /// so that all copies are aware of revocations. A pointer to this state is provided here, usually
+ /// by an implementation of KeysInterface.
+ pub fn new_with_revoked(inner: InMemorySigner, revoked_commitment: Arc<Mutex<u64>>, disable_revocation_policy_check: bool) -> Self {
+ Self {
+ inner,
+ last_commitment_number: Arc::new(Mutex::new(None)),
+ revoked_commitment,
+ disable_revocation_policy_check