Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swapd: Include buy, refund, and punish confs in state report #932

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
6 changes: 6 additions & 0 deletions src/swapd/state_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ pub struct StateReport {
pub arb_lock_confirmations: Option<u32>,
pub acc_lock_confirmations: Option<u32>,
pub cancel_confirmations: Option<u32>,
pub refund_confirmations: Option<u32>,
pub punish_confirmations: Option<u32>,
pub buy_confirmations: Option<u32>,
pub blocks_until_cancel_possible: Option<i64>,
pub blocks_until_punish_possible: Option<i64>,
pub blocks_until_safe_buy: Option<u32>,
Expand Down Expand Up @@ -66,6 +69,9 @@ impl StateReport {
arb_lock_confirmations: syncer_state.get_confs(TxLabel::Lock),
acc_lock_confirmations: syncer_state.get_confs(TxLabel::AccLock),
cancel_confirmations: syncer_state.get_confs(TxLabel::Cancel),
refund_confirmations: syncer_state.get_confs(TxLabel::Refund),
punish_confirmations: syncer_state.get_confs(TxLabel::Punish),
buy_confirmations: syncer_state.get_confs(TxLabel::Buy),
blocks_until_cancel_possible: syncer_state
.get_confs(TxLabel::Lock)
.map(|confs| temp_safety.blocks_until_cancel(confs)),
Expand Down