Skip to content

Commit

Permalink
Close group by fee in the same thread as close group by time
Browse files Browse the repository at this point in the history
  • Loading branch information
polespinasa committed May 19, 2024
1 parent f42394d commit f1d0333
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/grouphug-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ fn handle_addtx(transaction: &str, mut stream: TcpStream) {
groups.retain(|g| g.fee_rate != expected_group_fee);
}
}
close_group_by_fee();

// Send an OK message if the tx was added successfuly
stream.write(msg.as_bytes()).unwrap();

Expand Down Expand Up @@ -316,6 +316,7 @@ fn main() {
thread::spawn(|| {
loop {
check_time();
close_group_by_fee();
thread::sleep(Duration::from_secs(30));
}
});
Expand Down

0 comments on commit f1d0333

Please sign in to comment.