Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable transaction details without enabling block details #657

Merged
merged 2 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion book/src/advanced/mapper_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ include_transaction_details = <bool>
include_transaction_end_events = <bool>
include_block_cbor = <bool>
include_byron_ebb = <bool>
include_block_details = <bool>
```

- `include_block_end_events`: if enabled, the source will output an event signaling the end of a block, duplicating all of the data already sent in the corresponding block start event. Default value is `false`.
- `include_transaction_details`: if enabled, each transaction event payload will contain an nested version of all of the details of the transaction (inputs, outputs, mint, assets, metadata, etc). Useful when the pipeline needs to process the tx as a unit, instead of handling each sub-object as an independent event. Default value is `false`.
- `include_transaction_end_events`: if enabled, the source will output an event signaling the end of a transaction, duplicating all of the data already sent in the corresponding transaction start event. Defaul value is `false`.
- `include_transaction_end_events`: if enabled, the source will output an event signaling the end of a transaction, duplicating all of the data already sent in the corresponding transaction start event. Default value is `false`.
- `include_block_cbor`: if enabled, the block event will include the raw, unaltered cbor content received from the node, formatted as an hex string. Useful when some custom cbor decoding is required. Default value is `false`.
- `include_byron_ebb`: if enabled, a block event will be emmitted for legacy epoch boundary block of the Byron era (deprecated in newer eras). Useful when performing validation on previous block hashes. Default value is `false`.
- `include_block_details`: If enabled, all transactions in the block will be mapped. Default value is `false`.
2 changes: 1 addition & 1 deletion src/mapper/babbage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl EventWriter {
transactions: None,
};

if self.config.include_block_details {
if self.config.include_block_details || self.config.include_transaction_details {
record.transactions = Some(self.collect_babbage_tx_records(source)?);
}

Expand Down
2 changes: 1 addition & 1 deletion src/mapper/byron.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl EventWriter {
transactions: None,
};

if self.config.include_block_details {
if self.config.include_block_details || self.config.include_transaction_details {
record.transactions = Some(self.collect_byron_tx_records(source)?);
}

Expand Down
2 changes: 1 addition & 1 deletion src/mapper/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ impl EventWriter {
transactions: None,
};

if self.config.include_block_details {
if self.config.include_block_details || self.config.include_transaction_details {
record.transactions = Some(self.collect_shelley_tx_records(source)?);
}

Expand Down
Loading