区块的产生
HeaderPrePowWriter
/// Serializer that outputs the pre-pow part of the header,
/// including the nonce (last 8 bytes) that can be sent off
/// to the miner to mutate at will
pub struct HeaderPrePowWriter {
pub pre_pow: Vec<u8>,
}
get_block
// Ensure a block suitable for mining is built and returned
// If a wallet listener URL is not provided the reward will be "burnt"
// Warning: This call does not return until/unless a new block can be built
build_block
/// Builds a new block with the chain head as previous and eligible
/// transactions from the pool.
burn_reward
/// Probably only want to do this when testing.
get_coinbase
// Connect to the wallet listener and get coinbase.
// Warning: If a wallet listener URL is not provided the reward will be "burnt"