zcash_client_sqlite: Add tests that hit zcash/librustzcash#1326.

This commit is contained in:
Jack Grigg 2024-03-27 13:30:15 +00:00
parent 3ccc14f501
commit 020305fd20
1 changed files with 10 additions and 0 deletions

View File

@ -2901,6 +2901,10 @@ mod tests {
).as_deref(),
Ok(&[ref ret]) if (ret.outpoint(), ret.txout(), ret.height()) == (utxo.outpoint(), utxo.txout(), height_1)
);
assert_matches!(
st.wallet().get_unspent_transparent_output(utxo.outpoint()),
Ok(Some(ret)) if (ret.outpoint(), ret.txout(), ret.height()) == (utxo.outpoint(), utxo.txout(), height_1)
);
// Change the mined height of the UTXO and upsert; we should get back
// the same `UtxoId`.
@ -2917,6 +2921,12 @@ mod tests {
Ok(&[])
);
// We can still look up the specific output, and it has the expected height.
assert_matches!(
st.wallet().get_unspent_transparent_output(utxo2.outpoint()),
Ok(Some(ret)) if (ret.outpoint(), ret.txout(), ret.height()) == (utxo2.outpoint(), utxo2.txout(), height_2)
);
// If we include `height_2` then the output is returned.
assert_matches!(
st.wallet()