fix: remove get_ledger_account_hash and get_ledger_tx_hash host functions (#5850)

* remove `get_ledger_account_hash` and `get_ledger_tx_hash`

* fix build+tests
This commit is contained in:
Mayukha Vadari
2025-10-06 16:38:40 -04:00
committed by GitHub
parent cb622488c0
commit da2b9455f2
13 changed files with 306 additions and 464 deletions

View File

@@ -169,44 +169,6 @@ struct HostFuncImpl_test : public beast::unit_test::suite
BEAST_EXPECT(result.value() == env.current()->info().parentHash);
}
void
testGetLedgerAccountHash()
{
testcase("getLedgerAccountHash");
using namespace test::jtx;
Env env{*this};
OpenView ov{*env.current()};
ApplyContext ac = createApplyContext(env, ov);
auto const dummyEscrow =
keylet::escrow(env.master, env.seq(env.master));
WasmHostFunctionsImpl hfs(ac, dummyEscrow);
auto const result = hfs.getLedgerAccountHash();
if (BEAST_EXPECT(result.has_value()))
BEAST_EXPECT(result.value() == env.current()->info().accountHash);
}
void
testGetLedgerTransactionHash()
{
testcase("getLedgerTransactionHash");
using namespace test::jtx;
Env env{*this};
OpenView ov{*env.current()};
ApplyContext ac = createApplyContext(env, ov);
auto const dummyEscrow =
keylet::escrow(env.master, env.seq(env.master));
WasmHostFunctionsImpl hfs(ac, dummyEscrow);
auto const result = hfs.getLedgerTransactionHash();
if (BEAST_EXPECT(result.has_value()))
BEAST_EXPECT(result.value() == env.current()->info().txHash);
}
void
testGetBaseFee()
{
@@ -2899,7 +2861,7 @@ struct HostFuncImpl_test : public beast::unit_test::suite
void
testFloatNonIOU()
{
testcase("Float Xrp+Mpt");
testcase("float Xrp+Mpt");
using namespace test::jtx;
Env env{*this};
@@ -2961,6 +2923,7 @@ struct HostFuncImpl_test : public beast::unit_test::suite
void
testFloats()
{
testFloatTrace();
testFloatFromInt();
testFloatFromUint();
testFloatSet();
@@ -2973,7 +2936,6 @@ struct HostFuncImpl_test : public beast::unit_test::suite
testFloatPower();
testFloatLog();
testFloatNonIOU();
testFloatTrace();
}
void
@@ -2982,8 +2944,6 @@ struct HostFuncImpl_test : public beast::unit_test::suite
testGetLedgerSqn();
testGetParentLedgerTime();
testGetParentLedgerHash();
testGetLedgerAccountHash();
testGetLedgerTransactionHash();
testGetBaseFee();
testIsAmendmentEnabled();
testCacheLedgerObj();