Skip to content

Commit

Permalink
log errors returned by getblocktemplate method from internal miner
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 authored and gustavovalverde committed Sep 25, 2024
1 parent a938b59 commit 9f45473
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5784,9 +5784,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"

[[package]]
name = "winnow"
version = "0.6.19"
version = "0.6.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c52ac009d615e79296318c1bcce2d422aaca15ad08515e344feeda07df67a587"
checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b"
dependencies = [
"memchr",
]
Expand Down
4 changes: 4 additions & 0 deletions zebrad/src/components/miner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ where
while !template_sender.is_closed() && !is_shutting_down() {
let template: Result<_, _> = rpc.get_block_template(Some(parameters.clone())).await;

if template.is_err() {
info!(?template, "error getting block template")
}

// Wait for the chain to sync so we get a valid template.
let Ok(template) = template else {
info!(
Expand Down

0 comments on commit 9f45473

Please sign in to comment.