Skip to content

Commit 436d483

Browse files
committed
[FAB-10538]: Fix gossip scatter of pvt data
Currently while scattering pull request via gossip with digests of private data, same digest repeating several times and other digests of missing private data of other transactions from the block just ignored. This commit fixes scattering procedure to avoid repetitions in same pull request and also to efficiently retrieve all missing data from one peer within same request. Change-Id: If6287b1b04319a9ddc5937c09d0eec4d60f55e2d Signed-off-by: Artem Barger <bartem@il.ibm.com>
1 parent d126298 commit 436d483

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gossip/privdata/pull.go

+3
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,9 @@ func randomizeMemberList(members []discovery.NetworkMember) []discovery.NetworkM
514514
func digestsAsPointerSlice(digests []proto.PvtDataDigest) []*proto.PvtDataDigest {
515515
res := make([]*proto.PvtDataDigest, len(digests))
516516
for i, dig := range digests {
517+
// re-introduce dig variable to allocate
518+
// new address for each iteration
519+
dig := dig
517520
res[i] = &dig
518521
}
519522
return res

0 commit comments

Comments
 (0)