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

Add transaction record map #911

Merged
merged 15 commits into from
Apr 10, 2024

Conversation

zancas
Copy link
Member

@zancas zancas commented Apr 9, 2024

@fluidvanadium 's original hack was to add a native type that could have a foreign trait zcash_client_backend::data_api::InputSource implemented on it.

I've used a wrapper pattern with Deref and DerefMut implementations to all the "current" interface to be extended with the new interface (InputSource) while staying back compatible with the existing usage patterns.

This PR also pulls in the implementation of InputSource on TransactionRecordMap (I kept the same name as @fluidvanadium for the wrapper.)

@zancas zancas marked this pull request as ready for review April 9, 2024 18:42
@zancas zancas mentioned this pull request Apr 9, 2024
@zancas zancas marked this pull request as draft April 9, 2024 19:11
@zancas zancas marked this pull request as ready for review April 9, 2024 19:21
@zancas zancas marked this pull request as draft April 9, 2024 19:32
@zancas zancas marked this pull request as ready for review April 9, 2024 19:54
@zancas
Copy link
Member Author

zancas commented Apr 9, 2024

OK, I stand by my original argument. This type is added to provided an implementer for a foreign trait.

I vote we add this to dev, and I can hack on adding the functionality necessary to add the trait as a subsequent separate PR.

Copy link
Contributor

@fluidvanadium fluidvanadium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and approved

the Deref works out to save a lot of coding! how elegant!

@fluidvanadium fluidvanadium merged commit cdcda59 into zingolabs:dev Apr 10, 2024
17 checks passed
@zancas zancas deleted the add_transaction_record_map branch May 30, 2024 18:11
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

Successfully merging this pull request may close these issues.

2 participants