mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-04 17:27:00 +00:00
Fix sign cost (#6103)
This commit is contained in:
@@ -778,7 +778,7 @@ struct EscrowSmart_test : public beast::unit_test::suite
|
||||
auto const txMeta = env.meta();
|
||||
if (BEAST_EXPECT(txMeta && txMeta->isFieldPresent(sfGasUsed)))
|
||||
BEAST_EXPECTS(
|
||||
txMeta->getFieldU32(sfGasUsed) == 38'554,
|
||||
txMeta->getFieldU32(sfGasUsed) == 38'054,
|
||||
std::to_string(txMeta->getFieldU32(sfGasUsed)));
|
||||
if (BEAST_EXPECT(txMeta->isFieldPresent(sfWasmReturnCode)))
|
||||
BEAST_EXPECT(txMeta->getFieldI32(sfWasmReturnCode) == 1);
|
||||
|
||||
@@ -311,7 +311,7 @@ struct Wasm_test : public beast::unit_test::suite
|
||||
if (BEAST_EXPECT(re.has_value()))
|
||||
{
|
||||
BEAST_EXPECTS(re->result == 1, std::to_string(re->result));
|
||||
BEAST_EXPECTS(re->cost == 40'102, std::to_string(re->cost));
|
||||
BEAST_EXPECTS(re->cost == 39'602, std::to_string(re->cost));
|
||||
}
|
||||
|
||||
env.close();
|
||||
@@ -360,7 +360,7 @@ struct Wasm_test : public beast::unit_test::suite
|
||||
if (BEAST_EXPECT(re.has_value()))
|
||||
{
|
||||
BEAST_EXPECTS(re->result == 1, std::to_string(re->result));
|
||||
BEAST_EXPECTS(re->cost == 40'102, std::to_string(re->cost));
|
||||
BEAST_EXPECTS(re->cost == 39'602, std::to_string(re->cost));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ struct Wasm_test : public beast::unit_test::suite
|
||||
if (BEAST_EXPECT(re.has_value()))
|
||||
{
|
||||
BEAST_EXPECTS(re->result == 1, std::to_string(re->result));
|
||||
BEAST_EXPECTS(re->cost == 40'102, std::to_string(re->cost));
|
||||
BEAST_EXPECTS(re->cost == 39'602, std::to_string(re->cost));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -672,7 +672,7 @@ struct Wasm_test : public beast::unit_test::suite
|
||||
Bytes const wasm(wasmStr.begin(), wasmStr.end());
|
||||
TestHostFunctions hfs(env, 0);
|
||||
|
||||
auto const allowance = 153'534;
|
||||
auto const allowance = 291'334;
|
||||
auto re = runEscrowWasm(wasm, hfs, ESCROW_FUNCTION_NAME, {}, allowance);
|
||||
|
||||
if (BEAST_EXPECT(re.has_value()))
|
||||
|
||||
@@ -39,8 +39,8 @@ setCommonHostFunctions(HostFunctions* hfs, ImportVec& i)
|
||||
WASM_IMPORT_FUNC2(i, getCurrentLedgerObjNestedArrayLen, "get_current_ledger_obj_nested_array_len", hfs, 70);
|
||||
WASM_IMPORT_FUNC2(i, getLedgerObjNestedArrayLen, "get_ledger_obj_nested_array_len", hfs, 70);
|
||||
|
||||
WASM_IMPORT_FUNC2(i, checkSignature, "check_sig", hfs, 300);
|
||||
WASM_IMPORT_FUNC2(i, computeSha512HalfHash, "compute_sha512_half", hfs, 2000);
|
||||
WASM_IMPORT_FUNC2(i, checkSignature, "check_sig", hfs, 35'000);
|
||||
WASM_IMPORT_FUNC2(i, computeSha512HalfHash, "compute_sha512_half", hfs, 1'500);
|
||||
|
||||
WASM_IMPORT_FUNC2(i, accountKeylet, "account_keylet", hfs, 350);
|
||||
WASM_IMPORT_FUNC2(i, ammKeylet, "amm_keylet", hfs, 450);
|
||||
|
||||
Reference in New Issue
Block a user