Skip to content

Commit

Permalink
tuning msg
Browse files Browse the repository at this point in the history
  • Loading branch information
haxjump committed Nov 1, 2024
1 parent fbe58c9 commit 60a809e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chaindev"
version = "0.50.0"
version = "0.50.1"
edition = "2021"
authors = ["hui.fan@mail.ru"]
description = "Powerful development and testing utils for blockchain developers."
Expand Down
8 changes: 5 additions & 3 deletions src/beacon_based/ddev/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ where
.and_then(|mut env| {
// `rev()`: migrate newer nodes(bigger id) at first
for (i, id) in nodes.iter().rev().enumerate() {
env.migrate_node(*id, host.as_ref(), *force).c(d!())?;
let new_id = env.migrate_node(*id, host.as_ref(), *force).c(d!())?;
println!(
"The {}th node has been migrated, NodeID: {id}",
"The {}th node has been migrated, previous NodeID: {id}, current NodeID: {new_id}",
1 + i
);
}
Expand Down Expand Up @@ -664,7 +664,8 @@ where
}

// Migrate the target node to another host,
// NOTE: the node ID will be reallocated
// NOTE:
// - The node ID will be reallocated and returned
fn migrate_node(
&mut self,
node_id: NodeID,
Expand Down Expand Up @@ -744,6 +745,7 @@ where
.map(|_| ())
})
.and_then(|_| self.kick_node(Some(node_id), true, force).c(d!()))
.map(|_| new_node_id)
}

// Kick out a target node, or a randomly selected one,
Expand Down

0 comments on commit 60a809e

Please sign in to comment.