feat: implement display for Transaction#799
Merged
reez merged 1 commit intobitcoindevkit:masterfrom Jul 9, 2025
Merged
Conversation
Collaborator
|
I'm not sure it makes sense to derive the display trait for a debug string. The output won't be end-user friendly, so maybe this could be a "debug_string" method? |
Collaborator
Author
Yes, I figured. Thanks for confirming. But without display implementation we can't view or print Not sure how debug_string will help. Maybe in display implementation instead of forwarding the debug output, we can print a more user friendly transaction string. 😓 starting to sound "hacky" |
reez
approved these changes
Jul 9, 2025
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I think we need to be able to see the details of a
Transactionwhen printed. In Kotlin,Transactioncurrently prints the memory address and not the display. @reez and I had noticed this and discussed briefly, see here . I think we have manual implementations of display for struct likeAddress, so why not add it toTransactiontoo. Its a bit of a hassle, developing and testing and not being able to see the printout for Tx. I understand that swift is ok having justdebugtrait and can printout with no issues. This will at least for now allow JVM users see the actual printouts.Notes to the reviewers
Changelog notice
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
Bugfixes: