Skip to content

Commit

Permalink
Activity probabilities are adjusted
Browse files Browse the repository at this point in the history
  • Loading branch information
litch committed Jan 8, 2023
1 parent 25e7be4 commit 531ea2d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub async fn maybe_keysend_random_node() -> Result<(), Error> {
let nodes = list_nodes().await.unwrap();
for node in nodes {
log::debug!("Node under consideration: {:?}", node);
let probability = 0.05; // 5% probability
let probability = 0.01; // 1% probability

if rand::random::<f64>() < probability {
let amount: u64 = random::<u64>() % 700000 + 500;
Expand All @@ -118,7 +118,7 @@ pub async fn maybe_open_channel() -> Result<(), Error> {
let nodes = list_nodes().await.unwrap();
for node in nodes {
log::debug!("Perhaps open channel for node: {:?}", node);
let probability = 0.005; // 5% probability
let probability = 0.0003; // 0.03% probability

if rand::random::<f64>() < probability {

Expand Down Expand Up @@ -151,9 +151,9 @@ pub async fn spaz_out(config: Arc<Config>) -> Result<(), Error> {
if config.active == false {
// return Ok(())
}
// maybe_keysend_random_channel().await;
// maybe_disconnect_random_peer().await;
// maybe_keysend_random_node().await;
maybe_keysend_random_channel().await;
maybe_disconnect_random_peer().await;
maybe_keysend_random_node().await;
maybe_open_channel().await;
Ok(())
}

0 comments on commit 531ea2d

Please sign in to comment.