Skip to content

Commit

Permalink
Add block_timestamp_nanosec in TransactionReceipt
Browse files Browse the repository at this point in the history
  • Loading branch information
Sliman4 committed May 6, 2024
1 parent 5f0d83b commit 33c3514
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/indexer_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ impl IndexerState {
let processed_receipt = TransactionReceipt {
receipt: receipt.clone(),
block_height: message.block.header.height,
block_timestamp_nanosec: message.block.header.timestamp_nanosec
as u128,
};

if options.handle_preprocessed_transactions_by_indexer {
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ impl TryFrom<&IncompleteTransaction> for CompleteTransaction {
pub struct TransactionReceipt {
pub receipt: IndexerExecutionOutcomeWithReceipt,
pub block_height: BlockHeight,
#[serde(with = "near_utils::dec_format")]
pub block_timestamp_nanosec: u128,
}

impl TransactionReceipt {
Expand Down

0 comments on commit 33c3514

Please sign in to comment.