Skip to content

Commit

Permalink
move docs to struct
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Nov 7, 2022
1 parent 304048e commit ac93f92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
5 changes: 0 additions & 5 deletions zebra-rpc/src/methods/get_block_template_rpcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ where
Ok(GetBlockTemplate {
capabilities: vec![],

// The block version
version: ZCASH_BLOCK_VERSION,

previous_block_hash: GetBlockHash([0; 32].into()),
Expand All @@ -348,19 +347,15 @@ where

min_time: 0,

// Hardcoded list of block fields the miner is allowed to change.
mutable: constants::GET_BLOCK_TEMPLATE_MUTABLE_FIELD
.iter()
.map(ToString::to_string)
.collect(),

// A range of valid nonces that goes from `u32::MIN` to `u32::MAX`.
nonce_range: constants::GET_BLOCK_TEMPLATE_NONCE_RANGE_FIELD.to_string(),

// Max legacy signature operations in the block.
sigop_limit: MAX_BLOCK_SIGOPS,

// Max block size in bytes
size_limit: MAX_BLOCK_BYTES,

cur_time: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,18 @@ pub struct GetBlockTemplate {
// TODO: use DateTime32 type?
pub min_time: u32,

/// Add documentation.
/// Hardcoded list of block fields the miner is allowed to change.
pub mutable: Vec<String>,

/// Add documentation.
/// A range of valid nonces that goes from `u32::MIN` to `u32::MAX`.
#[serde(rename = "noncerange")]
pub nonce_range: String,

/// Add documentation.
///
/// The same as `MAX_BLOCK_SIGOPS`.
/// Max legacy signature operations in the block.
#[serde(rename = "sigoplimit")]
pub sigop_limit: u64,

/// Add documentation.
///
/// The same as `MAX_BLOCK_BYTES`.
/// Max block size in bytes
#[serde(rename = "sizelimit")]
pub size_limit: u64,

Expand Down

0 comments on commit ac93f92

Please sign in to comment.