Skip to content

Commit

Permalink
Improve mainchain reorg and IBD, bump version for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-L2L committed Jun 13, 2024
1 parent 21bbfbb commit 242432b
Show file tree
Hide file tree
Showing 14 changed files with 1,678 additions and 656 deletions.
23 changes: 18 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ authors = [
"Nikita Chashchinskii <[email protected]>"
]
edition = "2021"
version = "0.8.14"
version = "0.9.0"

[workspace.dependencies.bip300301]
git = "https://github.com/Ash-L2L/bip300301.git"
rev = "b74c5bbf6022701cbdfbd9a412327577e115ceda"
rev = "eb0b8e41dbe1dd8eb397aa5bfb3b793b46cafc30"

[workspace.dependencies.rustreexo]
git = "https://github.com/Ash-L2L/rustreexo.git"
Expand Down
2 changes: 1 addition & 1 deletion app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }
tokio-util = { version = "0.7.10", features = ["rt"] }
tracing = "0.1.40"
tracing-appender = "0.2.3"
tracing-subscriber = "0.3.18"
tracing-subscriber = { version = "0.3.18", features = ["json"] }
utoipa = "4.2.3"

[[bin]]
Expand Down
11 changes: 8 additions & 3 deletions app/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,14 @@ impl App {
.await?;
// miner_write.generate().await?;
tracing::trace!("confirming bmm...");
if let Some((header, body)) = miner_write.confirm_bmm().await? {
tracing::trace!("confirmed bmm, submitting block");
self.node.submit_block(&header, &body).await?;
if let Some((main_hash, header, body)) =
miner_write.confirm_bmm().await?
{
tracing::trace!(
"confirmed bmm, submitting block {}",
header.hash()
);
self.node.submit_block(main_hash, &header, &body).await?;
}
drop(miner_write);
self.update_wallet()?;
Expand Down
Loading

0 comments on commit 242432b

Please sign in to comment.