-
Notifications
You must be signed in to change notification settings - Fork 197
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
In API, filter out duplicated miniblocks. #4142
Conversation
node/external/blockAPI/shardBlock.go
Outdated
seenMiniblocks := make(map[string]struct{}) | ||
|
||
for _, miniblock := range miniblocks { | ||
if _, ok := seenMiniblocks[miniblock.Hash]; ok { |
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.
could have been multiple lines
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.
Fixed.
@@ -136,6 +138,22 @@ func (sbp *shardAPIBlockProcessor) convertShardBlockBytesToAPIBlock(hash []byte, | |||
}, nil | |||
} | |||
|
|||
func filterOutDuplicatedMiniblocks(miniblocks []*api.MiniBlock) []*api.MiniBlock { |
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.
test? :D
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.
Added 🚀
a7d9595
No description provided.