Commit 629e26e
committed
[FAB-7641] Fix panic when iterating over private data
The gossip pull delegates fetching data from the data retriever which is
a bridge between gossip and the transient store.
The data retriever quries the ledger and iterates over an iterator until
Next() returns nil (or error).
However, Next() can also return an object that has its inner fields be nil
which represent that this current data element has no data in it, and
iteration must continue on.
This change set makes the code skip if the inner element is nil,
and adds a unit test for this.
Change-Id: Ica249e3b3a5081b1fc7357baa45bf9d0bc209e11
Signed-off-by: yacovm <yacovm@il.ibm.com>1 parent 7af5264 commit 629e26e
2 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
0 commit comments