-
Notifications
You must be signed in to change notification settings - Fork 34
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
[Utility] Refactor and rename some existing functions related to handling transactions #771
Merged
Merged
Changes from 29 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
334b8b9
Split anteHandleMessage into multiple messages
Olshansk 8ea77eb
s/u.anteHandleMessage/u.basicValidateTransaction
Olshansk 820b18c
Rename processProposalBlockTransactions
Olshansk 80c8e48
s/HydrateIdxTx/HandleTransaction
Olshansk 41f4d0f
WIP commit
Olshansk 784ee24
Added GetIndexedTransaction
Olshansk e37daf2
Updated txProtoBytesToRPCIdxTxs to use txProtoBytesToRPCIdxTxs
Olshansk 7aa9231
Update changelogs
Olshansk 97d8398
Merge branch 'main' into minor_tx_processing_improvement
Olshansk d1ded6f
Attempt with mocking lots of persistence code
Olshansk a6d04a9
WIP
Olshansk e1f26d7
Added tests for TestGetIndexedTransaction
Olshansk bb643d2
Merge branch 'main' into minor_tx_processing_improvement
Olshansk 6a4330a
Implemented TestHandleTransaction_BasicValidation
Olshansk eda7427
Update comments
Olshansk 5886791
Merge with main
Olshansk 3f01cae
Reply to comments
Olshansk 42c384a
Merge with main
Olshansk a4338c7
Merge with main
Olshansk 98649e1
Updated persistence changelog
Olshansk 3abfd24
Broken test
Olshansk 45b9517
Comment out a single test
Olshansk 567cafb
Merge branch 'main' into minor_tx_processing_improvement
Olshansk ace8cd6
Merge with main
Olshansk d388caf
Update changelogs
Olshansk 2f23222
Merge with main
Olshansk 1c47870
Reply to Arash's comments
Olshansk 9d3743a
Fix the error we check for
Olshansk e19c62d
Change persistence changelog
Olshansk 2fe483a
Tend to a couple linter errors
Olshansk a68a4f9
Merge with main
Olshansk 7e46bb6
Revert the p2p error
Olshansk 3ea9936
Empty commit
Olshansk f0ec266
Merge branch 'main' into minor_tx_processing_improvement
Olshansk 12104a8
Update changelogs
Olshansk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
package types | ||
|
||
import "fmt" | ||
|
||
func (s *Signature) ValidateBasic() error { | ||
if s.Signature == nil { | ||
return fmt.Errorf("signature cannot be empty") | ||
return ErrEmptySignature() | ||
} | ||
if s.PublicKey == nil { | ||
return fmt.Errorf("public key cannot be empty") | ||
return ErrEmptyPublicKey() | ||
} | ||
return nil | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrapping errors in general makes more sense IMO (although I understand it would not be very consistent with current codebase)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of
error.go
myself (didn't create it), but we're just staying consistent with this approach we work on #556 to standardize it.