-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge batch size in configtx for both Raft and BFT
Signed-off-by: Emil Elizarov <emil.elizarov@ibm.com>
- Loading branch information
Emil Elizarov
committed
Aug 1, 2023
1 parent
6990301
commit 9deb9a5
Showing
11 changed files
with
174 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
Copyright IBM Corp All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package ordererclient | ||
|
||
import ( | ||
"github.com/hyperledger/fabric/protoutil" | ||
. "github.com/onsi/gomega" | ||
|
||
"github.com/hyperledger/fabric-protos-go/common" | ||
"github.com/hyperledger/fabric/integration/nwo" | ||
) | ||
|
||
func CreateBroadcastEnvelope(n *nwo.Network, entity interface{}, channel string, data []byte) *common.Envelope { | ||
var signer *nwo.SigningIdentity | ||
switch creator := entity.(type) { | ||
case *nwo.Peer: | ||
signer = n.PeerUserSigner(creator, "Admin") | ||
case *nwo.Orderer: | ||
signer = n.OrdererUserSigner(creator, "Admin") | ||
} | ||
Expect(signer).NotTo(BeNil()) | ||
|
||
env, err := protoutil.CreateSignedEnvelope( | ||
common.HeaderType_MESSAGE, | ||
channel, | ||
signer, | ||
&common.Envelope{Payload: data}, | ||
0, | ||
0, | ||
) | ||
Expect(err).NotTo(HaveOccurred()) | ||
|
||
return env | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.