global: snap

This commit is contained in:
nym21
2026-04-04 18:19:11 +02:00
parent 5340cc288e
commit 62f51761ee
23 changed files with 492 additions and 126 deletions

View File

@@ -109,9 +109,10 @@ impl Query {
pub fn outspend(&self, txid: &Txid, vout: Vout) -> Result<TxOutspend> {
let all = self.outspends(txid)?;
all.into_iter()
Ok(all
.into_iter()
.nth(usize::from(vout))
.ok_or(Error::OutOfRange("Output index out of range".into()))
.unwrap_or(TxOutspend::UNSPENT))
}
pub fn outspends(&self, txid: &Txid) -> Result<Vec<TxOutspend>> {