Skip to content

Conversation

@mvadari
Copy link
Collaborator

@mvadari mvadari commented Jan 28, 2026

High Level Overview of Change

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.4%. Comparing base (803a344) to head (7ebc59c).
⚠️ Report is 4 commits behind head on ripple/wasmi-host-functions.

Additional details and impacted files

Impacted file tree graph

@@                     Coverage Diff                     @@
##           ripple/wasmi-host-functions   #6291   +/-   ##
===========================================================
  Coverage                         80.4%   80.4%           
===========================================================
  Files                              854     854           
  Lines                            67574   67588   +14     
  Branches                          7313    7297   -16     
===========================================================
+ Hits                             54319   54346   +27     
+ Misses                           13255   13242   -13     
Files with missing lines Coverage Δ
src/xrpld/app/wasm/HostFunc.h 100.0% <ø> (ø)
src/xrpld/app/wasm/HostFuncImpl.h 83.3% <ø> (ø)
...xrpld/app/wasm/detail/HostFuncImplLedgerHeader.cpp 100.0% <100.0%> (ø)
src/xrpld/app/wasm/detail/HostFuncWrapper.cpp 98.2% <100.0%> (+2.0%) ⬆️

... and 6 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

return result;

return x < 0 ? x : (x >= 5 ? x : 0);
return sqn >= 5 ? (int32_t)sqn : 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We make changes to support values which are greater than INT_MAX, so you should return 1 here, not sqn
sqn >= 5 ? 1 : 0;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (BEAST_EXPECT(result.has_value()))
BEAST_EXPECT(result.value() == env.current()->parentCloseTime().time_since_epoch().count());
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should fix the tests, not just delete them

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are no longer relevant. We no longer have code there to check. There is no longer any such error case in these functions.

}

template <class IW>
Expected<uint64_t, HostFunctionError>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uint32_t

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto const seq = getDataUInt32(runtime, params, index);
if (!seq)
{
return hfResult(results, seq.error()); // LCOV_EXCL_LINE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing // LCOV_EXCL_LINE - Did you make some tests that can reach this point ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was planning to but didn't get around to it yesterday. Will do that today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants