Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unspent transparent note SQL should filter by expiry #360

Open
AArnott opened this issue Jun 29, 2024 · 0 comments
Open

Unspent transparent note SQL should filter by expiry #360

AArnott opened this issue Jun 29, 2024 · 0 comments

Comments

@AArnott
Copy link
Collaborator

AArnott commented Jun 29, 2024

@nuttycom says I should filter on transaction expiry as well. Think about re-org and abandoned transactions.

pub(crate) const GET_UNSPENT_TRANSPARENT_NOTES: &str = r#"
SELECT
height,
value_zat,
address
FROM utxos
LEFT OUTER JOIN transparent_received_output_spends j ON utxos.id = j.transparent_received_output_id
WHERE received_by_account_id = :account_id AND j.transaction_id IS NULL
ORDER BY height
"#;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant