Skip to content
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

fabric/gossip/gossip /certstore.go第53行代码有点问题? #4934

Open
11090815 opened this issue Jul 29, 2024 · 1 comment
Open

fabric/gossip/gossip /certstore.go第53行代码有点问题? #4934

11090815 opened this issue Jul 29, 2024 · 1 comment
Labels

Comments

@11090815
Copy link

Description

第53行代码处,不应该是pull.RequestMsgType,而应该是pull.ResponseMsgType吧。

Steps to reproduce

line 53 puller.RegisterMsgHook(pull.RequestMsgType, func(_ []string, msgs []*protoext.SignedGossipMessage, _ protoext.ReceivedMessage) {

==>>

line 53 puller.RegisterMsgHook(pull.ResponseMsgType, func(_ []string, msgs []*protoext.SignedGossipMessage, _ protoext.ReceivedMessage) {

@11090815 11090815 added the bug label Jul 29, 2024
@TomYuHua
Copy link

我也认为certstore.go第53行代码处要改为pull.ResponseMsgType.因为pullstore.go中(见179-209行)只有pullMsg=ResponseMsgType时,[]*protoext.SignedGossipMessag才会赋值,才会不为空,certstore.go行中RegisterMsgHook注册的函数的入参msgs []*protoext.SignedGossipMessag才会遍历执行。

I also believe that the code on line 53 in certstore.go should be changed to pull.ResponseMsgType. This is because in pullstore.go (see lines 179-209), the []*protoext.SignedGossipMessage array is only populated when pullMsg equals ResponseMsgType. This ensures that the array is not empty, allowing the function registered via RegisterMsgHook in certstore.go to iterate over the msgs []*protoext.SignedGossipMessage parameter and execute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants