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
bug fix get transaction api route #1876
Conversation
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.
good find and nice refactoring 👍
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.
Good find 🎉
@@ -500,17 +502,42 @@ func TestNode_GetTransaction_ShouldNotFindAndReturnUnknown(t *testing.T) { | |||
assert.Error(t, err) | |||
} | |||
|
|||
func getCacherHandler(find bool) func() dataRetriever.ShardedDataCacherNotifier { | |||
func getCacherHandler(find bool, cacherType string) func() dataRetriever.ShardedDataCacherNotifier { |
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.
You could have created separate functions to create the dummy pools (without the switch). But ok for now.
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.
System tests passed.
Fix panic bug when try to get a transaction which is in pool using api route /transaction/:txhash
Bug: In pool transactions are kept as objects ( Transaction, RewardTransaction, SmartContracResult, etc..) and when you try to get a transaction from pool there was a wrong cast to []byte which panics.
Fix: Removed the wrong cast and added a new function which do a cast to a specific transaction.