Skip to content

Commit

Permalink
fix mspFilterArray in case it's empty
Browse files Browse the repository at this point in the history
Signed-off-by: David VIEJO <[email protected]>
  • Loading branch information
dviejokfs committed Oct 15, 2024
1 parent db9230a commit 661d356
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kubectl-hlf/cmd/chaincode/getnext.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ type mspFilterArray struct {

// Accept returns true if this peer's MSPID is in the array of MSPIDs
func (f *mspFilterArray) Accept(peer fab.Peer) bool {
if len(f.mspIDs) == 0 {
return true
}
for _, mspID := range f.mspIDs {
if peer.MSPID() == mspID {
return true
Expand All @@ -72,7 +75,6 @@ func (f *mspFilterArray) Accept(peer fab.Peer) bool {
return false
}


func (c *getNextCmd) run(out io.Writer, stdErr io.Writer) error {
mspID := c.mspID
configBackend := config.FromFile(c.configPath)
Expand Down

0 comments on commit 661d356

Please sign in to comment.