Skip to content

Commit

Permalink
Increase default HeaderQueue max_age value
Browse files Browse the repository at this point in the history
  • Loading branch information
mappum committed Feb 13, 2024
1 parent b1a02a8 commit 73fb2df
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,28 @@ impl ConvertSdkTx for InnerApp {
Ok(PaidCall { payer, paid })
}

"nomic/PayIntoFeePool" => {
let msg = msg
.value
.as_object()
.ok_or_else(|| Error::App("Invalid message value".to_string()))?;

let recovery_addr: bitcoin::Address = msg["recovery_address"]
.as_str()
.ok_or_else(|| Error::App("Invalid recovery address".to_string()))?
.parse()
.map_err(|_| Error::App("Invalid recovery address".to_string()))?;

let script =
crate::bitcoin::adapter::Adapter::new(recovery_addr.script_pubkey());

let funding_amt = MIN_FEE;
let payer = build_call!(self.accounts.take_as_funding(funding_amt.into()));
let paid = build_call!(self.bitcoin.set_recovery_script(script.clone()));

Ok(PaidCall { payer, paid })
}

_ => Err(Error::App("Unsupported message type".into())),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/bitcoin/header_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use orga::prelude::*;
use orga::Error as OrgaError;
use orga::Result as OrgaResult;

const MAX_LENGTH: u64 = 4032;
const MAX_LENGTH: u64 = 24_192; // ~6 months
const MAX_RELAY: u64 = 250;
const MAX_TIME_INCREASE: u32 = 2 * 60 * 60;
const RETARGET_INTERVAL: u32 = 2016;
Expand Down

0 comments on commit 73fb2df

Please sign in to comment.