• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hyperledger / fabric-x-committer / 30747708169
91%
main: 91%

Build:
Build:
LAST BUILD BRANCH: fix/696-integration-port-reservation
DEFAULT BRANCH: main
Ran 02 Aug 2026 12:26PM UTC
Jobs 3
Files 131
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Aug 2026 12:22PM UTC coverage: 91.439% (+0.2%) from 91.201%
30747708169

Pull #726

github

liran-funaro
[utils] Distinguish an optional channel output from a failed write

#### Type of change

- Bug fix
- Improvement (improvement to code, performance, etc)
- Test update

#### Description

- Add `channel.NewOptionalWriter`, for an output the caller may leave unset. When its output is
  nil the value is discarded and the write reports success, so writing unconditionally does not
  look like a delivery failure.
- `channel.NewWriter` keeps its contract: a nil output always reports failure, since the value
  cannot be delivered. Documented on the constructor, along with which one to reach for.
- Use the new constructor in `utils/deliver` and `utils/deliverorderer`, the two places that treat
  a nil output channel as "this output is not wanted", and correct their comments. They claimed
  the write was a no-op while it was in fact reported as failed; both discard the result, so
  neither was affected.
- Document on `deliver.Parameters` that its two output channels are optional. `deliverorderer`
  already documents this on its own parameters.

#### Additional details (Optional)

The distinction matters because a `false` return is what tells a caller its value was not
delivered, and several callers use it to decide whether to return in-flight work to a tracker and
retry — for example the coordinator's VC manager, which re-adds a batch to `txBeingValidated` when
a forward fails. Making a nil output report success globally would turn a misconfigured output
into silent data loss, so the discarding behavior is opt-in per writer rather than the default.

`TestNilOutputWriter` covers the four cases: a nil required output, a nil optional output, an
optional output that is set (which must behave exactly like `NewWriter`, including on
cancellation), and an optional writer passed through `WithContext`.

#### Related issues

- resolves #722

Signed-off-by: Liran Funaro <liran.funaro@gmail.com>
Pull Request #726: [utils] Distinguish an optional channel output from a failed write

29 of 29 new or added lines in 3 files covered. (100.0%)

16 existing lines in 6 files now uncovered.

10595 of 11587 relevant lines covered (91.44%)

37807.29 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
91.94
-2.84% service/coordinator/signature_verifier_manager.go
4
95.65
-4.35% service/verifier/verifier_server.go
2
81.9
-1.9% service/query/query.go
2
94.82
-0.8% service/coordinator/coordinator.go
1
94.95
-1.01% loadgen/adapters/common.go
1
80.33
-1.64% utils/utils.go
Jobs
ID Job ID Ran Files Coverage
1 unit-test - 30747708169.1 02 Aug 2026 12:28PM UTC 95
84.58
GitHub Action Run
2 core-db-test - 30747708169.2 02 Aug 2026 12:26PM UTC 100
46.47
GitHub Action Run
3 db-test - 30747708169.3 02 Aug 2026 12:28PM UTC 131
79.35
GitHub Action Run
Source Files on build 30747708169
  • Tree
  • List 131
  • Changed 23
  • Source Changed 0
  • Coverage Changed 23
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #726
  • PR Base - main (#30541649421)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc