librustzcash
librustzcash copied to clipboard
zcash_client_backend: Expose the set of unexpired transactions having zero confirmations.
This is needed for the client to be able to determine whether to rebroadcast a transaction.
I think this can currently be supported by v_transactions: these are the set of transactions for which mined_height IS NULL and expiry_height is not greater than the current chain tip.
We may still want to add a direct Rust API for this to help us move away from v_transactions, but I don't see this issue as a blocker for rebroadcasts.
these are the set of transactions for which
mined_height IS NULLandexpiry_heightis not greater than the current chain tip.
I got that completely backwards: it's the set of transactions for which mined_height IS NULL and expiry_height is greater than the current chain tip. This is because expiry_height is the last height at which a transaction can be mined; if expiry_height <= chain_tip_height then the transaction can never be mined.
We currently have the opposite concept exposed in v_transactions as expired_unmined (although that uses the narrower / more conservative upper bound of the largest height we've scanned).