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

hyperledger / fabric-x-common / 34488940055
82%
main: 82%

Build:
Build:
LAST BUILD BRANCH: testcrypto-prepare-block-in-place
DEFAULT BRANCH: main
Ran 10 Sep 2026 02:26PM UTC
Jobs 1
Files 198
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

10 Sep 2026 02:24PM UTC coverage: 81.961% (+0.03%) from 81.93%
34488940055

Pull #186

github

liran-funaro
[testcrypto] Let a block's owner prepare it without a clone or a rehash

#### Type of change

- New feature
- Test update

#### Description

- `InPlace` writes the header and metadata into the block passed in, rather than into a deep clone of
  it. The clone is what makes it safe to prepare a block the caller intends to reuse or submit twice,
  so this is opt-in: for a producer that built the block for this call alone, the copy is pure waste.
- `ReuseDataHash` takes the data hash from the header the caller already filled in, so a producer can
  compute it off this call's critical path. It is ignored when the block has no header or an empty
  hash, so a caller that sets it and forgets to supply one gets a correct block rather than a silently
  corrupt one.
- Both default to today's behaviour, so no existing caller changes.
- Tested by equivalence, which is the only thing that makes the options worth having: the block
  prepared the fast way is proto-identical to the block prepared the cloning way, in place returns the
  same object it was given, and asking to reuse a hash that was never supplied still produces the
  right one.

#### Related issues

- resolves #185

Signed-off-by: Liran Funaro <liran.funaro@gmail.com>
Pull Request #186: [testcrypto] Let a block's owner prepare it without a clone or a rehash

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

13644 of 16647 relevant lines covered (81.96%)

0.82 hits per line

Jobs
ID Job ID Ran Files Coverage
1 34488940055.1 10 Sep 2026 02:26PM UTC 198
81.96
GitHub Action Run
Source Files on build 34488940055
  • Tree
  • List 198
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #186
  • PR Base - main (#34463562854)
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