Skip to content

Commit 6e4a281

Browse files
committed
parse fmd sechash
1 parent 7993489 commit 6e4a281

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

app/src/parser_impl_txn.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,11 +557,13 @@ static parser_error_t readTransferTxn(const bytes_t *data, parser_tx_t *v) {
557557
}
558558
v->transfer.targets.len = ctx.buffer + ctx.offset - v->transfer.targets.ptr;
559559

560-
// shielded hash, check if it is there
560+
// shielded data, check if it is there
561561
CHECK_ERROR(readByte(&ctx, &v->transfer.has_shielded_data))
562562
if (v->transfer.has_shielded_data){
563563
v->transfer.shielded_hash.len = HASH_LEN;
564+
v->transfer.fmd_section_hash.len = HASH_LEN;
564565
CHECK_ERROR(readBytes(&ctx, &v->transfer.shielded_hash.ptr, v->transfer.shielded_hash.len))
566+
CHECK_ERROR(readBytes(&ctx, &v->transfer.fmd_section_hash.ptr, v->transfer.fmd_section_hash.len))
565567
}
566568

567569
if (ctx.offset != ctx.bufferLen) {
@@ -926,11 +928,13 @@ static parser_error_t readIBCTxn(const bytes_t *data, parser_tx_t *v) {
926928
}
927929
v->ibc.transfer.targets.len = ctx.buffer + ctx.offset - v->ibc.transfer.targets.ptr;
928930

929-
// shielded hash, check if it is there
931+
// shielded data, check if it is there
930932
CHECK_ERROR(readByte(&ctx, &v->ibc.transfer.has_shielded_data))
931933
if (v->ibc.transfer.has_shielded_data){
932934
v->ibc.transfer.shielded_hash.len = HASH_LEN;
935+
v->ibc.transfer.fmd_section_hash.len = HASH_LEN;
933936
CHECK_ERROR(readBytes(&ctx, &v->ibc.transfer.shielded_hash.ptr, v->ibc.transfer.shielded_hash.len))
937+
CHECK_ERROR(readBytes(&ctx, &v->ibc.transfer.fmd_section_hash.ptr, v->ibc.transfer.fmd_section_hash.len))
934938
}
935939
}
936940

app/src/parser_types.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,12 @@ typedef struct {
333333
bytes_t targets;
334334
uint32_t no_symbol_sources;
335335
uint32_t no_symbol_targets;
336+
337+
/* shielded data begin */
336338
uint8_t has_shielded_data;
337339
bytes_t shielded_hash;
340+
bytes_t fmd_section_hash;
341+
/* shielded data end */
338342
} tx_transfer_t;
339343

340344
typedef struct {

0 commit comments

Comments
 (0)