crate::ix!();
pub const DEFAULT_PRINTPRIORITY: bool = false;
pub struct BlockTemplate
{
block: Block,
tx_fees: Vec<Amount>,
tx_sig_ops_cost: Vec<i64>,
vch_coinbase_commitment: Vec<u8>,
}
pub struct TxMemPoolModifiedEntry {
iter: TxMemPoolTxIter,
n_size_with_ancestors: u64,
n_mod_fees_with_ancestors: Amount,
n_sig_op_cost_with_ancestors: i64,
}
impl TxMemPoolModifiedEntry {
pub fn new(entry: TxMemPoolTxIter) -> Self {
todo!();
}
pub fn get_modified_fee(&self) -> i64 {
todo!();
}
pub fn get_size_with_ancestors(&self) -> u64 {
todo!();
}
pub fn get_mod_fees_with_ancestors(&self) -> Amount {
todo!();
}
pub fn get_tx_size(&self) -> usize {
todo!();
}
pub fn get_tx(&self) -> &Transaction {
todo!();
}
}
pub struct CompareTxMemPoolIter {
}
impl CompareTxMemPoolIter {
pub fn invoke(&self,
a: &TxMemPoolTxIter,
b: &TxMemPoolTxIter) -> bool {
todo!();
}
}
pub mod modifiedentry_iter {
use super::*;
pub type ResultType = TxMemPoolTxIter;
pub fn invoke(entry: &TxMemPoolModifiedEntry) -> ResultType {
todo!();
}
}
pub struct CompareTxIterByAncestorCount {
}
impl CompareTxIterByAncestorCount {
pub fn invoke(&self,
a: &TxMemPoolTxIter,
b: &TxMemPoolTxIter) -> bool {
todo!();
}
}
lazy_static!{
}
pub type IndexedModifiedTransactionSet = Broken;
pub struct UpdateForParentInclusion {
iter: TxMemPoolTxIter,
}
impl UpdateForParentInclusion {
pub fn new(it: TxMemPoolTxIter) -> Self {
todo!();
}
pub fn invoke(&mut self, e: &mut TxMemPoolModifiedEntry) {
todo!();
}
}
pub struct BlockAssembler {
pblocktemplate: Box<BlockTemplate>,
include_witness: bool,
n_block_max_weight: u32,
block_min_fee_rate: FeeRate,
n_block_weight: u64,
n_block_tx: u64,
n_block_sig_ops_cost: u64,
n_fees: Amount,
in_block: TxMemPoolSetEntries,
n_height: i32,
n_lock_time_cutoff: i64,
chainparams: Arc<ChainParams>,
mempool: Arc<TxMemPool>,
chainstate: Arc<Mutex<ChainState>>,
}
pub mod block_assembler {
use super::*;
pub struct Options {
n_block_max_weight: usize,
block_min_fee_rate: FeeRate,
}
impl Default for Options {
fn default() -> Self {
todo!();
}
}
lazy_static!{
}
}
pub fn update_time(
pblock: *mut BlockHeader,
consensus_params: &ChainConsensusParams,
pindex_prev: *const BlockIndex) -> i64 {
todo!();
}
pub fn regenerate_commitments(
block: &mut Block,
chainman: &mut ChainstateManager) {
todo!();
}
pub fn default_options() -> block_assembler::Options {
todo!();
}
impl BlockAssembler {
pub fn new_with_options(
chainstate: &mut ChainState,
mempool: &TxMemPool,
params: &ChainParams,
options: &block_assembler::Options) -> Self {
todo!();
}
pub fn new(
chainstate: &mut ChainState,
mempool: &TxMemPool,
params: &ChainParams) -> Self {
todo!();
}
pub fn reset_block(&mut self) {
todo!();
}
pub fn create_new_block(&mut self, script_pub_key_in: &Script) -> Box<BlockTemplate> {
todo!();
}
pub fn only_unconfirmed(&mut self, test_set: &mut TxMemPoolSetEntries) {
todo!();
}
pub fn test_package(&self,
package_size: u64,
package_sig_ops_cost: i64) -> bool {
todo!();
}
pub fn test_package_transactions(&self, package: &TxMemPoolSetEntries) -> bool {
todo!();
}
pub fn add_to_block(&mut self, iter: TxMemPoolTxIter) {
todo!();
}
#[EXCLUSIVE_LOCKS_REQUIRED(m_mempool.cs)]
pub fn update_packages_for_added(&mut self,
already_added: &TxMemPoolSetEntries,
map_modified_tx: &mut IndexedModifiedTransactionSet) -> i32 {
todo!();
}
#[EXCLUSIVE_LOCKS_REQUIRED(m_mempool.cs)]
pub fn skip_map_tx_entry(&mut self,
it: TxMemPoolTxIter,
map_modified_tx: &mut IndexedModifiedTransactionSet,
failed_tx: &mut TxMemPoolSetEntries) -> bool {
todo!();
}
pub fn sort_for_block(&mut self,
package: &TxMemPoolSetEntries,
sorted_entries: &mut Vec<TxMemPoolTxIter>) {
todo!();
}
#[EXCLUSIVE_LOCKS_REQUIRED(m_mempool.cs)]
pub fn add_package_txs(&mut self,
n_packages_selected: &mut i32,
n_descendants_updated: &mut i32) {
todo!();
}
}
pub fn increment_extra_nonce(
pblock: *mut Block,
pindex_prev: *const BlockIndex,
n_extra_nonce: &mut u32) {
todo!();
}