Commit 35c3ecf
authored
fix(gossip): return after sending NACK on private data store failure (#5422)
When StorePvtData fails inside privateDataMessage, a NACK is sent via
msg.Ack(err) but the function continues executing due to a missing return
statement. This causes two problems:
1. msg.Ack(nil) is called unconditionally right after, sending a false
success ACK to the sender even though the storage failed.
2. The debug log "Private data for collection X has been stored" is
printed even when the data was not actually stored, which is misleading
for operators trying to diagnose private data issues.
Adding an explicit return after the NACK ensures the function exits on
error and only reaches msg.Ack(nil) and the success log on the happy path.
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>1 parent b16bb17 commit 35c3ecf
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| 367 | + | |
367 | 368 | | |
368 | 369 | | |
369 | 370 | | |
| |||
0 commit comments