MCPcopy Create free account
hub / github.com/ElementsProject/elements / IsValidSubtraction

Function IsValidSubtraction

src/test/fuzz/scriptnum_ops.cpp:21–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21bool IsValidSubtraction(const CScriptNum& lhs, const CScriptNum& rhs)
22{
23 return rhs == 0 || (rhs > 0 && lhs >= CScriptNum{std::numeric_limits<int64_t>::min()} + rhs) || (rhs < 0 && lhs <= CScriptNum{std::numeric_limits<int64_t>::max()} + rhs);
24}
25} // namespace
26
27FUZZ_TARGET(scriptnum_ops)

Callers 1

FUZZ_TARGETFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected