Skip to content

Commit 4ac9093

Browse files
committed
Amend
1 parent cfa0f3c commit 4ac9093

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

crates/mockcore/src/state.rs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,13 @@ impl State {
2525
pub(crate) fn new(network: Network, version: usize, fail_lock_unspent: bool) -> Self {
2626
let mut hashes = Vec::new();
2727
let mut blocks = BTreeMap::new();
28-
let mut transactions = BTreeMap::new();
29-
let mut utxos = BTreeMap::new();
3028

3129
let genesis_block = bitcoin::blockdata::constants::genesis_block(network);
3230
let genesis_block_hash = genesis_block.block_hash();
33-
let genesis_transaction = genesis_block.coinbase().unwrap().clone();
3431

3532
hashes.push(genesis_block_hash);
3633
blocks.insert(genesis_block_hash, genesis_block);
3734

38-
transactions.insert(
39-
genesis_transaction.compute_txid(),
40-
genesis_transaction.clone(),
41-
);
42-
43-
utxos.insert(
44-
OutPoint {
45-
txid: genesis_transaction.compute_txid(),
46-
vout: 0,
47-
},
48-
Amount::from_sat(50 * COIN_VALUE),
49-
);
50-
5135
Self {
5236
blocks,
5337
change_addresses: BTreeSet::new(),
@@ -60,9 +44,9 @@ impl State {
6044
network,
6145
nonce: 0,
6246
receive_addresses: BTreeSet::new(),
63-
transactions,
47+
transactions: BTreeMap::new(),
6448
txid_to_block_height: BTreeMap::new(),
65-
utxos,
49+
utxos: BTreeMap::new(),
6650
version,
6751
wallet: Wallet::new(network),
6852
wallets: BTreeSet::new(),

0 commit comments

Comments
 (0)