Skip to content

refactor: use slices.Contains to simplify code #5222

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

Merged
merged 1 commit into from
Jun 3, 2025

Conversation

pengqiseven
Copy link
Contributor

Type of change

  • Improvement (improvement to code, performance, etc)

Description

use slices.Contains to simplify code

Additional details

Related issues

@pengqiseven pengqiseven requested a review from a team as a code owner May 17, 2025 00:28
pfi79
pfi79 previously approved these changes May 30, 2025
@pfi79
Copy link
Contributor

pfi79 commented May 30, 2025

gossip/gossip/msgstore/msgs_test.go
The gofumpt command 'gofumpt -l -s -w' must be run for these files
make: *** [Makefile:194: linter] Error 1

Signed-off-by: pengqiseven <912170095@qq.com>
@pengqiseven
Copy link
Contributor Author

gossip/gossip/msgstore/msgs_test.go
The gofumpt command 'gofumpt -l -s -w' must be run for these files
make: *** [Makefile:194: linter] Error 1

Oh..

Thanks for your reply and help.

I have execute gofumpt -l -s -w gossip/gossip/msgstore/msgs_test.go.

Please review.

@pengqiseven
Copy link
Contributor Author

Unfortunately, the CI has failed. However, I checked the reason, and it seems unrelated to this change.

2025-06-03 15:09:04.068 UTC 015b WARN [gateway] Endorse -> Endorse call timed out while collecting endorsements channel=test_channel chaincode=test_chaincode txID= numEndorsers=1
--- FAIL: TestEndorse (0.41s)
    --- FAIL: TestEndorse/endorse_retry_-_org3_fail_&_1_org2_peer_fail_-_requires_2_from_org1 (0.01s)
        endorse_test.go:582: 
            	Error Trace:	/home/runner/work/fabric/fabric/internal/pkg/gateway/endorse_test.go:582
            	Error:      	Received unexpected error:
            	            	rpc error: code = Aborted desc = failed to collect enough transaction endorsements, see attached details for more info
            	Test:       	TestEndorse/endorse_retry_-_org3_fail_&_1_org2_peer_fail_-_requires_2_from_org1

@pfi79 pfi79 merged commit 06794ee into hyperledger:main Jun 3, 2025
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants