Skip to content

Commit

Permalink
[rename] renaming a few structs in aptos-move
Browse files Browse the repository at this point in the history
  • Loading branch information
davidiw committed Mar 7, 2022
1 parent cee3bf4 commit aef28a8
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions aptos-move/aptos-validator-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use aptos_types::{
};
use move_binary_format::file_format::CompiledModule;

pub trait DiemValidatorInterface: Sync {
pub trait AptosValidatorInterface: Sync {
fn get_account_state_by_version(
&self,
account: AccountAddress,
Expand Down Expand Up @@ -99,12 +99,12 @@ pub trait DiemValidatorInterface: Sync {
}

pub struct DebuggerStateView<'a> {
db: &'a dyn DiemValidatorInterface,
db: &'a dyn AptosValidatorInterface,
version: Option<Version>,
}

impl<'a> DebuggerStateView<'a> {
pub fn new(db: &'a dyn DiemValidatorInterface, version: Option<Version>) -> Self {
pub fn new(db: &'a dyn AptosValidatorInterface, version: Option<Version>) -> Self {
Self { db, version }
}
}
Expand Down
4 changes: 2 additions & 2 deletions aptos-move/aptos-validator-interface/src/storage_interface.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) The Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::DiemValidatorInterface;
use crate::AptosValidatorInterface;
use anyhow::{anyhow, Result};
use aptos_config::config::RocksdbConfig;
use aptos_types::{
Expand Down Expand Up @@ -29,7 +29,7 @@ impl DBDebuggerInterface {
}
}

impl DiemValidatorInterface for DBDebuggerInterface {
impl AptosValidatorInterface for DBDebuggerInterface {
fn get_account_state_by_version(
&self,
account: AccountAddress,
Expand Down
10 changes: 5 additions & 5 deletions aptos-move/transaction-replay/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use aptos_types::{
transaction::{ChangeSet, Transaction, TransactionOutput, Version, WriteSetPayload},
write_set::WriteOp,
};
use aptos_validator_interface::{DBDebuggerInterface, DebuggerStateView, DiemValidatorInterface};
use aptos_validator_interface::{AptosValidatorInterface, DBDebuggerInterface, DebuggerStateView};
use aptos_vm::{
convert_changeset_and_events, data_cache::RemoteStorage, logging::AdapterLogSchema, DiemVM,
VMExecutor,
Expand All @@ -31,14 +31,14 @@ use std::path::{Path, PathBuf};
#[cfg(test)]
mod unit_tests;

pub struct DiemDebugger {
debugger: Box<dyn DiemValidatorInterface>,
pub struct AptosDebugger {
debugger: Box<dyn AptosValidatorInterface>,
build_dir: PathBuf,
storage_dir: PathBuf,
}

impl DiemDebugger {
pub fn new(debugger: Box<dyn DiemValidatorInterface>) -> Self {
impl AptosDebugger {
pub fn new(debugger: Box<dyn AptosValidatorInterface>) -> Self {
Self {
debugger,
build_dir: PathBuf::from(move_cli::DEFAULT_BUILD_DIR),
Expand Down
4 changes: 2 additions & 2 deletions aptos-move/transaction-replay/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

use anyhow::{bail, Result};
use aptos_transaction_replay::DiemDebugger;
use aptos_transaction_replay::AptosDebugger;
use aptos_types::{
account_address::AccountAddress,
event::EventKey,
Expand Down Expand Up @@ -91,7 +91,7 @@ enum Command {
fn main() -> Result<()> {
let opt = Opt::from_args();
let debugger = if let Some(p) = opt.db {
DiemDebugger::db(p)?
AptosDebugger::db(p)?
} else {
panic!("No debugger attached")
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) The Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::{unit_tests::TestInterface, DiemDebugger};
use crate::{unit_tests::TestInterface, AptosDebugger};
use anyhow::bail;
use aptos_types::{
account_address::AccountAddress,
Expand All @@ -13,7 +13,7 @@ use std::path::PathBuf;

#[test]
fn test_bisection() {
let debugger = DiemDebugger::new(Box::new(TestInterface::empty(100)));
let debugger = AptosDebugger::new(Box::new(TestInterface::empty(100)));
let check = |v: Vec<bool>, result| {
assert_eq!(
debugger
Expand All @@ -40,7 +40,7 @@ fn test_bisection() {

#[test]
fn test_changeset_override() {
let debugger = DiemDebugger::new(Box::new(TestInterface::genesis()));
let debugger = AptosDebugger::new(Box::new(TestInterface::genesis()));
let address = AccountAddress::random();
let mut override_changeset = ChangeSet::new();
override_changeset
Expand Down
4 changes: 2 additions & 2 deletions aptos-move/transaction-replay/src/unit_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

mod bisection_tests;

use crate::DiemValidatorInterface;
use crate::AptosValidatorInterface;
use anyhow::{bail, Result};
use aptos_types::{
account_address::AccountAddress,
Expand Down Expand Up @@ -70,7 +70,7 @@ impl TestInterface {
}
}

impl DiemValidatorInterface for TestInterface {
impl AptosValidatorInterface for TestInterface {
fn get_account_state_by_version(
&self,
account: AccountAddress,
Expand Down

0 comments on commit aef28a8

Please sign in to comment.