XRPL-Labs / xrpld-hooks

ISC License
94 stars 28 forks source link

otxn_field_txt() call doesn't seem to work #13

Closed technotip closed 1 year ago

technotip commented 3 years ago

Issue Description

otxn_field_txt method seems to be missing from hook_api header file.

Steps to Reproduce

    {
        uint8_t output[50];
        int64_t result_len = otxn_field_txt(SBUF(output), sfAccount);

        if(result_len != 50)
                rollback(SBUF("Testcase:  bytes written"), 100);

        trace(SBUF("Testcase: account field"), SBUF(output), 1);
        trace_num(SBUF("Testcase: result_len"), result_len);
    }

Expected Result

Output a field from the originating transaction as a human readable string. In above case, sfAccount field.

Actual Result

[RippledError(Submit failed, { resultCode: 'temMALFORMED',
  resultMessage: 'Malformed transaction.',
  engine_result: 'temMALFORMED',
  engine_result_code: -299,
  engine_result_message: 'Malformed transaction.',

Log output

Malformed transaction. 
Hook attempted to import a function that does not appear in the hook_api function set: `otxn_field_txt`
RichardAH commented 1 year ago

This API has been removed