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

hyperledger / fabric-x-committer / 26212692047
92%
main: 91%

Build:
Build:
LAST BUILD BRANCH: fix/coordinator-waiting-status-count
DEFAULT BRANCH: main
Ran 21 May 2026 07:47AM UTC
Jobs 5
Files 130
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

21 May 2026 07:44AM UTC coverage: 91.834% (+0.3%) from 91.503%
26212692047

Pull #605

github

cendhu
Fix numWaitingTxsForStatus not counting rejected transactions

Problem:
The coordinator numWaitingTxsForStatus counter only incremented by
len(blk.Txs), ignoring len(blk.Rejected). When a block contained
rejected transactions, the counter was never decremented back to zero
because sendTxStatus decrements by the actual number of statuses
returned (which includes rejected txs). This caused the waiting
transaction count to go negative, breaking the
NumberOfWaitingTransactionsForStatus API and any callers that rely on
it to determine when all transactions have been processed.

Root cause:
In receiveAndProcessBlock, the counter increment only used len(blk.Txs)
without len(blk.Rejected), despite the metrics counter on the line
above correctly including both via len(blk.Txs)+len(blk.Rejected).

Fix:
Change numWaitingTxsForStatus to add len(blk.Txs) + len(blk.Rejected),
matching the metrics and ensuring the counter is correctly decremented
to zero when all transaction statuses (including rejected) are sent
back to the sidecar.

Added TestWaitingTxsCountReturnsToZeroForBlockWithRejectedTxs to
verify the counter returns to zero after processing a block that
contains both normal and rejected transactions.

Signed-off-by: Senthilnathan <cendhu@gmail.com>
Pull Request #605: [coordinator] Fix numWaitingTxsForStatus not counting rejected transactions

1 of 1 new or added line in 1 file covered. (100.0%)

822 existing lines in 48 files now uncovered.

10256 of 11168 relevant lines covered (91.83%)

82267.42 hits per line

Coverage Regressions

Lines Coverage ∆ File
119
23.35
-71.26% service/sidecar/notify.go
79
59.55
-20.22% service/sidecar/sidecar.go
65
60.16
-25.39% service/sidecar/mapping.go
65
56.9
-37.36% utils/deliverorderer/verify.go
47
79.95
-12.4% mock/orderer.go
45
83.02
-13.89% utils/deliverorderer/orderer.go
32
54.93
-45.07% utils/testsig/certificates.go
32
7.5
-80.0% service/sidecar/block_query.go
26
55.17
-44.83% utils/grpcerror/wrap.go
25
74.17
-20.83% mock/coordinator.go
23
12.12
-69.7% utils/signature/verify_bls.go
23
67.78
-25.56% utils/signature/verify.go
22
65.59
-23.66% service/verifier/verify.go
16
64.15
-15.09% utils/serialization/envelope.go
13
55.17
-44.83% utils/serve/interceptors.go
12
86.73
-10.62% utils/testsig/key_factory.go
12
78.38
-16.22% service/verifier/policy/policy.go
11
23.53
-64.71% utils/testsig/digest_signer.go
10
73.68
-21.05% utils/dbconn/database_connection.go
10
59.66
-8.4% service/sidecar/block_delivery.go
9
85.33
-12.0% utils/deliver/delivery.go
9
77.5
-22.5% utils/channel/ready.go
9
68.97
-31.03% api/servicepb/height.go
8
69.23
-20.51% utils/encoding.go
8
75.0
-11.11% service/sidecar/block_store.go
7
81.97
-11.48% utils/channel/reader_writer.go
7
88.14
-11.86% utils/sync_map.go
6
67.74
-19.35% utils/deliverorderer/config.go
6
0.0
-100.0% utils/signature/verify_eddsa.go
6
44.44
-33.33% utils/deliverorderer/errors.go
6
70.0
-30.0% utils/signature/verify_ecdsa.go
5
58.33
-41.67% utils/serve/config.go
5
77.03
-6.76% loadgen/workload/tx_builder.go
4
95.65
-2.17% service/verifier/verifier_server.go
4
70.75
-2.72% utils/connection/tls.go
4
72.41
-13.79% utils/delivercommitter/committer.go
4
66.67
-16.67% utils/serialization/transaction.go
4
80.39
-7.84% utils/testsig/ns_endorser.go
4
80.0
-20.0% utils/retry/sustain.go
4
73.33
-26.67% utils/ordererdial/config.go
3
85.86
1.57% utils/serve/start_serve.go
2
84.62
0.43% service/sidecar/relay.go
2
95.92
-4.08% mock/stream_state.go
2
92.11
0.0% service/coordinator/validator_committer_manager.go
2
78.95
-10.53% utils/ordererdial/identity.go
2
89.47
-5.26% utils/testsig/message_endorser.go
2
76.47
-11.76% utils/connection/healthcheck.go
1
95.12
-2.44% utils/ordererdial/dialinfo.go
Jobs
ID Job ID Ran Files Coverage
1 core-db-test - 26212692047.1 21 May 2026 07:47AM UTC 100
45.31
GitHub Action Run
2 db-test - 26212692047.2 21 May 2026 12:47PM UTC 130
84.38
GitHub Action Run
3 db-test - 26212692047.3 22 May 2026 09:20AM UTC 130
84.21
GitHub Action Run
4 core-db-test - 26212692047.4 22 May 2026 09:17AM UTC 100
45.31
GitHub Action Run
5 unit-test - 26212692047.5 22 May 2026 09:20AM UTC 82
76.67
GitHub Action Run
Source Files on build 26212692047
  • Tree
  • List 130
  • Changed 11
  • Source Changed 0
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #605
  • PR Base - main (#26142711552)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc