Block

new

    /// Builds a new block from the header of the previous block, a vector of
    /// transactions and the private key that will receive the reward. Checks
    /// that all transactions are valid and calculates the Merkle tree.

hydrate_from

    /// Hydrate a block from a compact block.
    /// Note: caller must validate the block themselves, we do not validate it
    /// here.

as_compact_block

/// Generate the compact block representation.

with_reward

    /// Builds a new block ready to mine from the header of the previous block,
    /// a vector of transactions and the reward information. Checks
    /// that all transactions are valid and calculates the Merkle tree.

hash

total_fees

cut_through

    /// Matches any output with a potential spending input, eliminating them
    /// from the block. Provides a simple way to cut-through the block. The
    /// elimination is stable with respect to the order of inputs and outputs.
    /// Method consumes the block.
    ///
    /// NOTE: exclude coinbase from cut-through process
    /// if a block contains a new coinbase output and
    /// is a transaction spending a previous coinbase
    /// we do not want to cut-through (all coinbase must be preserved)

validate

    /// Validates all the elements in a block that can be checked without
    /// additional data. Includes commitment sums and kernels, Merkle
    /// trees, reward, etc.

verify_coinbase

    /// Validate the coinbase.body.outputs generated by miners.
    /// Check the sum of coinbase-marked outputs match
    /// the sum of coinbase-marked kernels accounting for fees.

inputs

inputs_mut

outputs

outputs_mut

kernels

kernels_mut

results matching ""

    No results matching ""