diff --git a/aptos-indexer-processors-sdk/Cargo.lock b/aptos-indexer-processors-sdk/Cargo.lock index d37b1b5..cee9f9a 100644 --- a/aptos-indexer-processors-sdk/Cargo.lock +++ b/aptos-indexer-processors-sdk/Cargo.lock @@ -202,7 +202,7 @@ dependencies = [ [[package]] name = "aptos-profiler" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-core.git?rev=1fc4424ee1099830ae667a0bda43ab5d7fd3c8f7#1fc4424ee1099830ae667a0bda43ab5d7fd3c8f7" +source = "git+https://github.com/aptos-labs/aptos-core.git?rev=6a97e34ae27da4757fc569bb3d3ffe553b098776#6a97e34ae27da4757fc569bb3d3ffe553b098776" dependencies = [ "anyhow", "backtrace", @@ -215,7 +215,7 @@ dependencies = [ [[package]] name = "aptos-protos" version = "1.3.1" -source = "git+https://github.com/aptos-labs/aptos-core.git?rev=1fc4424ee1099830ae667a0bda43ab5d7fd3c8f7#1fc4424ee1099830ae667a0bda43ab5d7fd3c8f7" +source = "git+https://github.com/aptos-labs/aptos-core.git?rev=6a97e34ae27da4757fc569bb3d3ffe553b098776#6a97e34ae27da4757fc569bb3d3ffe553b098776" dependencies = [ "pbjson", "prost", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "aptos-system-utils" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-core.git?rev=1fc4424ee1099830ae667a0bda43ab5d7fd3c8f7#1fc4424ee1099830ae667a0bda43ab5d7fd3c8f7" +source = "git+https://github.com/aptos-labs/aptos-core.git?rev=6a97e34ae27da4757fc569bb3d3ffe553b098776#6a97e34ae27da4757fc569bb3d3ffe553b098776" dependencies = [ "anyhow", "aptos-profiler", @@ -246,7 +246,7 @@ dependencies = [ [[package]] name = "aptos-transaction-filter" version = "0.1.0" -source = "git+https://github.com/aptos-labs/aptos-core.git?rev=1fc4424ee1099830ae667a0bda43ab5d7fd3c8f7#1fc4424ee1099830ae667a0bda43ab5d7fd3c8f7" +source = "git+https://github.com/aptos-labs/aptos-core.git?rev=6a97e34ae27da4757fc569bb3d3ffe553b098776#6a97e34ae27da4757fc569bb3d3ffe553b098776" dependencies = [ "anyhow", "aptos-protos", diff --git a/aptos-indexer-processors-sdk/Cargo.toml b/aptos-indexer-processors-sdk/Cargo.toml index 2170f2f..1614a93 100644 --- a/aptos-indexer-processors-sdk/Cargo.toml +++ b/aptos-indexer-processors-sdk/Cargo.toml @@ -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" diff --git a/aptos-indexer-processors-sdk/transaction-stream/src/transaction_stream.rs b/aptos-indexer-processors-sdk/transaction-stream/src/transaction_stream.rs index 00e8f79..b123804 100644 --- a/aptos-indexer-processors-sdk/transaction-stream/src/transaction_stream.rs +++ b/aptos-indexer-processors-sdk/transaction-stream/src/transaction_stream.rs @@ -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 diff --git a/aptos-indexer-processors-sdk/transaction-stream/src/utils/time.rs b/aptos-indexer-processors-sdk/transaction-stream/src/utils/time.rs index 2b227e4..61576f3 100644 --- a/aptos-indexer-processors-sdk/transaction-stream/src/utils/time.rs +++ b/aptos-indexer-processors-sdk/transaction-stream/src/utils/time.rs @@ -16,7 +16,7 @@ pub fn parse_timestamp(ts: &Timestamp, version: i64) -> chrono::DateTime { 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))