relay broadcast transactions to peers#1026
Open
josibake wants to merge 1 commit into
Open
Conversation
subscribe the outbound transaction protocol to locally broadcast transaction messages and announce them through the existing inv path. the handler preserves the existing was_announced/null-hash behavior and avoids echoing a transaction back to the channel that originated the broadcast. added to support broadcast from sparrow wallet; discovered while testing the silent payments index PRs.
evoskuil
reviewed
Jun 3, 2026
| if (sender == identifier()) | ||
| return true; | ||
|
|
||
| if (!message || !message->transaction_ptr) |
Member
There was a problem hiding this comment.
This constitutes fault suppression, as it implies a contract failure that remains unexposed. This could be an assertion, as it should abort the process, and the assertion makes the failure easier to identify and documents the intent. However without the assertion the failure will occur as well.
This is such a common condition we don’t generally bother to assert for it. While some would consider the suppression good defensive programming, really it just condones a bug somewhere else. If this was public API surface the approach would be different, but this is internal communication under contract.
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.
subscribe the outbound transaction protocol to locally broadcast transaction messages and announce them through the existing inv path.
the handler preserves the existing was_announced/null-hash behavior and avoids echoing a transaction back to the channel that originated the broadcast.
added to support broadcast from sparrow wallet; discovered while testing the silent payments index PRs.