You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log_info!(logger,"Ignoring second claim for outpoint {}:{}, already registered its claiming request", req.outpoints()[0].txid, req.outpoints()[0].vout);
740
+
// First drop any duplicate claims.
741
+
requests.retain(|req| {
742
+
debug_assert_eq!(
743
+
req.outpoints().len(),
744
+
1,
745
+
"Claims passed to `update_claims_view_from_requests` should not be aggregated"
let package_locktime = req.package_locktime(cur_height);
759
-
if package_locktime > cur_height + 1{
760
-
log_info!(logger,"Delaying claim of package until its timelock at {} (current height {}), the following outpoints are spent:", package_locktime, cur_height);
761
-
for outpoint in req.outpoints(){
762
-
log_info!(logger," Outpoint {}", outpoint);
770
+
// Then try to maximally aggregate `requests`.
771
+
for i in(1..requests.len()).rev(){
772
+
for j in0..i {
773
+
if requests[i].can_merge_with(&requests[j], cur_height){
log_trace!(logger,"Test if outpoint which our counterparty can spend at {} can be aggregated based on aggregation limit {}", req.counterparty_spendable_height(), cur_height + CLTV_SHARED_CLAIM_BUFFER);
769
-
if req.counterparty_spendable_height() <= cur_height + CLTV_SHARED_CLAIM_BUFFER || !req.aggregable(){
let package_locktime = req.package_locktime(cur_height);
789
+
if package_locktime > cur_height + 1{
790
+
log_info!(logger,"Delaying claim of package until its timelock at {} (current height {}), the following outpoints are spent:", package_locktime, cur_height);
0 commit comments