Skip to content

Commit

Permalink
Added support to fabric smartbft protos. (#58)
Browse files Browse the repository at this point in the history
Signed-off-by: arkadipiven <arkadi7770@gmail.com>
Co-authored-by: Arkadi Piven <arkadi.piven@ibm.com>
  • Loading branch information
arkadiPiven and Arkadi Piven authored Jun 23, 2023
1 parent 88e418e commit a953f6a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions protolator/protoext/ordererext/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ package ordererext
import (
"fmt"

"github.com/hyperledger/fabric-protos-go/orderer/smartbft"

"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes/empty"
"github.com/hyperledger/fabric-protos-go/common"
Expand Down Expand Up @@ -80,6 +82,8 @@ func (ct *ConsensusType) VariablyOpaqueFieldProto(name string) (proto.Message, e
switch ct.Type {
case "etcdraft":
return &etcdraft.ConfigMetadata{}, nil
case "BFT":
return &smartbft.Options{}, nil
default:
return &empty.Empty{}, nil
}
Expand Down Expand Up @@ -146,6 +150,8 @@ func (docv *DynamicOrdererConfigValue) StaticallyOpaqueFieldProto(name string) (
return &orderer.ChannelRestrictions{}, nil
case "Capabilities":
return &common.Capabilities{}, nil
case "Orderers":
return &common.Orderers{}, nil
default:
return nil, fmt.Errorf("unknown Orderer ConfigValue name: %s", docv.name)
}
Expand Down

0 comments on commit a953f6a

Please sign in to comment.