Skip to content
Open
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
8 changes: 4 additions & 4 deletions aptos-indexer-processors-sdk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions aptos-indexer-processors-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ sample = { path = "sample" }

ahash = { version = "0.8.7", features = ["serde"] }
anyhow = "1.0.86"
aptos-protos = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "1fc4424ee1099830ae667a0bda43ab5d7fd3c8f7" }
aptos-system-utils = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "1fc4424ee1099830ae667a0bda43ab5d7fd3c8f7" }
aptos-transaction-filter = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "1fc4424ee1099830ae667a0bda43ab5d7fd3c8f7" }
aptos-protos = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "6a97e34ae27da4757fc569bb3d3ffe553b098776" }
aptos-system-utils = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "6a97e34ae27da4757fc569bb3d3ffe553b098776" }
aptos-transaction-filter = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "6a97e34ae27da4757fc569bb3d3ffe553b098776" }
async-trait = "0.1.80"
autometrics = { version = "1.0.1", features = ["prometheus-exporter"] }
axum = "0.7.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,19 +425,19 @@ impl TransactionStream {
// The processed range may not exist if using the v1 transaction stream.
// In the case that it doesn't exist, use the previous behavior of using the transaction version of the first and last transactions.
let start_version = match r.processed_range {
Some(range) => range.first_version,
Some(ref range) => range.first_version,
None => r.transactions.as_slice().first().unwrap().version,
};
let end_version = match r.processed_range {
Some(range) => range.last_version,
Some(ref range) => range.last_version,
None => r.transactions.as_slice().last().unwrap().version,
};

// The processed range does not contain a timestamp, so we use the timestamp of the first and last transactions.
let start_txn_timestamp =
r.transactions.as_slice().first().and_then(|t| t.timestamp);
r.transactions.as_slice().first().and_then(|t| t.timestamp.clone());
let end_txn_timestamp =
r.transactions.as_slice().last().and_then(|t| t.timestamp);
r.transactions.as_slice().last().and_then(|t| t.timestamp.clone());

let size_in_bytes = r.encoded_len() as u64;
let chain_id: u64 = r
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub fn parse_timestamp(ts: &Timestamp, version: i64) -> chrono::DateTime<Utc> {
nanos: 0,
}
} else {
*ts
ts.clone()
};
chrono::DateTime::from_timestamp(final_ts.seconds, final_ts.nanos as u32)
.unwrap_or_else(|| panic!("Could not parse timestamp {:?} for version {}", ts, version))
Expand Down