@@ -48,7 +48,7 @@ use bitcoin::consensus::Decodable;
48
48
use bitcoin:: hashes:: Hash ;
49
49
50
50
/// The number of confirmations required before moving a [`Contract`] to the confirmed state.
51
- pub const NB_CONFIRMATIONS : u32 = 1 ;
51
+ pub const NB_CONFIRMATIONS : u32 = 0 ;
52
52
/// The delay to set the refund value to.
53
53
pub const REFUND_DELAY : u32 = 86400 * 7 ;
54
54
/// The nSequence value used for CETs in DLC channels
@@ -577,6 +577,7 @@ where
577
577
let confirmations = self . blockchain . get_transaction_confirmations (
578
578
& contract. accepted_contract . dlc_transactions . fund . txid ( ) ,
579
579
) ?;
580
+ #[ allow( clippy:: absurd_extreme_comparisons) ]
580
581
if confirmations >= NB_CONFIRMATIONS {
581
582
self . store
582
583
. update_contract ( & Contract :: Confirmed ( contract. clone ( ) ) ) ?;
@@ -707,6 +708,7 @@ where
707
708
let confirmations = self
708
709
. blockchain
709
710
. get_transaction_confirmations ( & broadcasted_txid) ?;
711
+ #[ allow( clippy:: absurd_extreme_comparisons) ]
710
712
if confirmations >= NB_CONFIRMATIONS {
711
713
let closed_contract = ClosedContract {
712
714
attestations : contract. attestations . clone ( ) ,
@@ -744,6 +746,7 @@ where
744
746
. blockchain
745
747
. get_transaction_confirmations ( & signed_cet. txid ( ) ) ?;
746
748
749
+ #[ allow( clippy:: absurd_extreme_comparisons) ]
747
750
if confirmations < 1 {
748
751
// TODO(tibo): if this fails because another tx is already in
749
752
// mempool or blockchain, we might have been cheated. There is
@@ -1361,6 +1364,7 @@ where
1361
1364
1362
1365
// TODO(lucas): No need to send it again if it is in mempool, unless we want to bump the
1363
1366
// fee.
1367
+ #[ allow( clippy:: absurd_extreme_comparisons) ]
1364
1368
if confirmations < 1 {
1365
1369
self . blockchain . send_transaction ( claim_tx) ?;
1366
1370
} else if confirmations >= NB_CONFIRMATIONS {
0 commit comments