Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Nov 7, 2022
1 parent e7e16b8 commit 304048e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion zebra-rpc/src/methods/get_block_template_rpcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ where
TODO: create a method Transaction::new_v5_coinbase(network, tip_height, miner_fee),
and call it here.
*/
*/
let coinbase_tx = if mempool_txs.is_empty() {
let empty_string = String::from("");
return Ok(GetBlockTemplate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ use zebra_state::LatestChainTip;
use zebra_test::mock_service::{MockService, PanicAssertion};

use crate::methods::{
get_block_template_rpcs::types::{hex_data::HexData, submit_block},
get_block_template_rpcs::types::{
get_block_template::GetBlockTemplate, hex_data::HexData, submit_block,
},
GetBlockHash, GetBlockTemplateRpc, GetBlockTemplateRpcImpl,
};

Expand Down Expand Up @@ -122,10 +124,7 @@ fn snapshot_rpc_getblockhash(block_hash: GetBlockHash, settings: &insta::Setting
}

/// Snapshot `getblocktemplate` response, using `cargo insta` and JSON serialization.
fn snapshot_rpc_getblocktemplate(
block_template: crate::methods::get_block_template_rpcs::types::get_block_template::GetBlockTemplate,
settings: &insta::Settings,
) {
fn snapshot_rpc_getblocktemplate(block_template: GetBlockTemplate, settings: &insta::Settings) {
settings.bind(|| insta::assert_json_snapshot!("get_block_template", block_template));
}

Expand Down

0 comments on commit 304048e

Please sign in to comment.