Skip to content

Commit

Permalink
chore: Minor cleanups (#9198)
Browse files Browse the repository at this point in the history
* Remove unnecessary clone

* Fix test in zebra-script

* Document that RPC server addr must be set

* Change the log level of missing port msg to info

Having the RPC port not specified is part of Zebra's normal operation,
and is the default config.

* Fix links in docs for tracing

* Update zebrad/src/commands/start.rs

Co-authored-by: Alfredo Garcia <[email protected]>

---------

Co-authored-by: Alfredo Garcia <[email protected]>
  • Loading branch information
upbqdn and oxarbitrage authored Feb 4, 2025
1 parent d26b0c1 commit a5a1cdf
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
8 changes: 4 additions & 4 deletions book/src/user/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ and the [`flamegraph`][flamegraph] runtime config option.

Compile Zebra with `--features sentry` to monitor it using [Sentry][sentry] in production.

[tracing_section]: https://docs.rs/zebrad/latest/zebrad/components/tracing/struct.Config.html
[filter]: https://docs.rs/zebrad/latest/zebrad/components/tracing/struct.Config.html#structfield.filter
[flamegraph]: https://docs.rs/zebrad/latest/zebrad/components/tracing/struct.Config.html#structfield.flamegraph
[tracing_section]: https://docs.rs/zebrad/latest/zebrad/components/tracing/struct.InnerConfig.html
[filter]: https://docs.rs/zebrad/latest/zebrad/components/tracing/struct.InnerConfig.html#structfield.filter
[flamegraph]: https://docs.rs/zebrad/latest/zebrad/components/tracing/struct.InnerConfig.html#structfield.flamegraph
[flamegraphs]: http://www.brendangregg.com/flamegraphs.html
[systemd_journald]: https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html
[use_journald]: https://docs.rs/zebrad/latest/zebrad/components/tracing/struct.Config.html#structfield.use_journald
[use_journald]: https://docs.rs/zebrad/latest/zebrad/components/tracing/struct.InnerConfig.html#structfield.use_journald
[sentry]: https://sentry.io/welcome/
4 changes: 2 additions & 2 deletions zebra-consensus/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,9 +575,9 @@ where
miner_fee,
legacy_sigop_count,
},
Request::Mempool { transaction: ref tx, .. } => {
Request::Mempool { transaction: tx, .. } => {
let transaction = VerifiedUnminedTx::new(
tx.clone(),
tx,
miner_fee.expect("fee should have been checked earlier"),
legacy_sigop_count,
)?;
Expand Down
4 changes: 4 additions & 0 deletions zebra-rpc/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ impl RpcServer {
///
/// Returns [`JoinHandle`]s for the RPC server and `sendrawtransaction` queue tasks,
/// and a [`RpcServer`] handle, which can be used to shut down the RPC server task.
///
/// # Panics
///
/// - If [`Config::listen_addr`] is `None`.
//
// TODO:
// - put some of the configs or services in their own struct?
Expand Down
4 changes: 4 additions & 0 deletions zebra-script/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@ mod tests {

let input_index = 0;

verifier
.is_valid(NetworkUpgrade::Blossom, input_index + 1)
.expect_err("verification should fail");

verifier
.is_valid(NetworkUpgrade::Blossom, input_index + 1)
.expect_err("verification should fail");
Expand Down
2 changes: 1 addition & 1 deletion zebrad/src/commands/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ impl StartCmd {
);
rpc_task_handle.await.unwrap()
} else {
warn!("configure an listen_addr to start the RPC server");
info!("configure a listen_addr to start the RPC server");
(
tokio::spawn(std::future::pending().in_current_span()),
tokio::spawn(std::future::pending().in_current_span()),
Expand Down

0 comments on commit a5a1cdf

Please sign in to comment.