Self { blocks, change_addresses: Vec::new(), descriptors: Vec::new(), fail_lock_unspent, hashes, locked: BTreeSet::new(), mempool: Vec::new(), network, nonce: 0, sent: Vec::new(), transactions: BTreeMap::new(), utxos: BTreeMap::new(), version, wallets: BTreeSet::new(), loaded_wallets: BTreeSet::new(), } } pub(crate) fn push_block(&mut self, subsidy: u64) -> Block { let coinbase = Transaction { version: 0, lock_time: LockTime::ZERO, input: vec![TxIn { previous_output: OutPoint::null(), script_sig: script::Builder::new() .push_int(self.blocks.len().try_into().unwrap()) .into_script(), sequence: Sequence::MAX, witness: Witness::new(), }], output: vec![TxOut { value: subsidy + self .mempool .iter() .map(|tx| { let fee = tx .input .iter()