Unverified Commit e8514271 authored by Jay Guo's avatar Jay Guo Committed by Artem Barger
Browse files

[FAB-13456] Fix race in etcdraft test



Change-Id: I9fe663c4efa46e5644571d238f4d7ea8f4e51626
Signed-off-by: default avatarJay Guo <guojiannan1101@gmail.com>
parent 2755580a
......@@ -2385,6 +2385,7 @@ func newChain(timeout time.Duration, channel string, dataDir string, id uint64,
// receives blocks and metadata and appends it into
// the ledger struct to simulate write behaviour
appendBlockToLedger := func(b *common.Block, meta []byte) {
b = proto.Clone(b).(*common.Block)
bytes, err := proto.Marshal(&common.Metadata{Value: meta})
Expect(err).NotTo(HaveOccurred())
b.Metadata.Metadata[common.BlockMetadataIndex_ORDERER] = bytes
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment