Skip to content

Commit

Permalink
consensus: Rename contract_state.rs to operations.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
goshawk committed Jan 10, 2024
1 parent fa061c0 commit a350623
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 72 deletions.
2 changes: 1 addition & 1 deletion consensus/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use crate::commons::{ConsensusError, Database, QuorumMsgSender, RoundUpdate};
use crate::config::CONSENSUS_MAX_ITER;
use crate::contract_state::Operations;
use crate::operations::Operations;
use crate::phase::Phase;

use node_data::ledger::Block;
Expand Down
62 changes: 0 additions & 62 deletions consensus/src/contract_state.rs

This file was deleted.

2 changes: 1 addition & 1 deletion consensus/src/execution_ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

use crate::commons::{ConsensusError, Database, QuorumMsgSender, RoundUpdate};

use crate::contract_state::Operations;
use crate::iteration_ctx::IterationCtx;
use crate::msg_handler::HandleMsgOutput::{Pending, Ready};
use crate::msg_handler::MsgHandler;
use crate::operations::Operations;
use crate::queue::Queue;
use crate::step_votes_reg::SafeCertificateInfoRegistry;
use crate::user::committee::Committee;
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ pub mod user;

mod aggregator;
pub mod config;
pub mod contract_state;
mod execution_ctx;
mod msg_handler;
pub mod operations;
mod phase;
mod proposal;
mod queue;
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/phase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// Copyright (c) DUSK NETWORK. All rights reserved.

use crate::commons::{ConsensusError, Database};
use crate::contract_state::Operations;
use crate::execution_ctx::ExecutionCtx;
use crate::operations::Operations;

use node_data::message::Message;
use node_data::StepName;
Expand Down
8 changes: 4 additions & 4 deletions consensus/src/proposal/block_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
// Copyright (c) DUSK NETWORK. All rights reserved.

use crate::commons::RoundUpdate;
use crate::contract_state::CallParams;
use crate::operations::CallParams;
use node_data::ledger::{to_str, Block, Certificate, IterationsInfo, Seed};

use crate::config;
use crate::contract_state::Operations;
use crate::merkle::merkle_root;
use crate::operations::Operations;

use dusk_bytes::Serializable;
use node_data::ledger;
Expand All @@ -35,7 +35,7 @@ impl<T: Operations> Generator<T> {
ru: &RoundUpdate,
iteration: u8,
failed_iterations: Vec<Option<Certificate>>,
) -> Result<Message, crate::contract_state::Error> {
) -> Result<Message, crate::operations::Error> {
// Sign seed
let seed = ru
.secret_key
Expand Down Expand Up @@ -82,7 +82,7 @@ impl<T: Operations> Generator<T> {
seed: Seed,
iteration: u8,
failed_iterations: Vec<Option<Certificate>>,
) -> Result<Block, crate::contract_state::Error> {
) -> Result<Block, crate::operations::Error> {
let start_time = Instant::now();

let call_params = CallParams {
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/proposal/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// Copyright (c) DUSK NETWORK. All rights reserved.

use crate::commons::{ConsensusError, Database};
use crate::contract_state::Operations;
use crate::execution_ctx::ExecutionCtx;
use crate::msg_handler::{HandleMsgOutput, MsgHandler};
use crate::operations::Operations;
use node_data::message::Message;
use std::cmp;
use std::sync::Arc;
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/ratification/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// Copyright (c) DUSK NETWORK. All rights reserved.

use crate::commons::{ConsensusError, Database, RoundUpdate};
use crate::contract_state::Operations;
use crate::execution_ctx::ExecutionCtx;
use crate::operations::Operations;
use std::marker::PhantomData;

use crate::msg_handler::{HandleMsgOutput, MsgHandler};
Expand Down

0 comments on commit a350623

Please sign in to comment.