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

[State Sync] Add sync_for_duration() mode. #14954

Merged
merged 3 commits into from
Oct 16, 2024
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
7 changes: 7 additions & 0 deletions consensus/src/state_computer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,13 @@ async fn test_commit_sync_race() {
Ok(())
}

async fn sync_for_duration(
&self,
_duration: std::time::Duration,
) -> std::result::Result<LedgerInfoWithSignatures, Error> {
unreachable!()
}

async fn sync_to_target(
&self,
target: LedgerInfoWithSignatures,
Expand Down
12 changes: 11 additions & 1 deletion consensus/src/state_computer_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ use aptos_types::{
transaction::{ExecutionStatus, SignedTransaction, Transaction, TransactionStatus},
validator_txn::ValidatorTransaction,
};
use std::sync::{atomic::AtomicU64, Arc};
use std::{
sync::{atomic::AtomicU64, Arc},
time::Duration,
};
use tokio::{runtime::Handle, sync::Mutex as AsyncMutex};

struct DummyStateSyncNotifier {
Expand Down Expand Up @@ -62,6 +65,13 @@ impl ConsensusNotificationSender for DummyStateSyncNotifier {
Ok(())
}

async fn sync_for_duration(
&self,
_duration: Duration,
) -> Result<LedgerInfoWithSignatures, Error> {
unreachable!()
}

async fn sync_to_target(&self, _target: LedgerInfoWithSignatures) -> Result<(), Error> {
unreachable!()
}
Expand Down
Loading
Loading