statistics.insert(&Statistic::Schema.key(), &SCHEMA_VERSION)?;
}
tx.commit()?;
database
}
Err(error) => bail!("failed to open index: {error}"),
};
let genesis_block_coinbase_transaction =
options.chain().genesis_block().coinbase().unwrap().clone();
Ok(Self {
genesis_block_coinbase_txid: genesis_block_coinbase_transaction.txid(),
client,
database,
durability,
first_inscription_height: options.first_inscription_height(),
genesis_block_coinbase_transaction,
height_limit: options.height_limit,
options: options.clone(),
index_runes,
index_sats,
path,
unrecoverably_reorged: AtomicBool::new(false),
})
}
pub(crate) fn get_locked_outputs(&self, _wallet: Wallet) -> Result<BTreeSet<OutPoint>> {
#[derive(Deserialize)]
pub(crate) struct JsonOutPoint {
txid: bitcoin::Txid,
vout: u32,
}
Ok(
self
.client
.call::<Vec<JsonOutPoint>>("listlockunspent", &[])?