diff --git a/src/bank.rs b/src/bank.rs index ebd157dd2c..2b62348889 100644 --- a/src/bank.rs +++ b/src/bank.rs @@ -326,7 +326,7 @@ impl Bank { error_counters.account_not_found_leader += 1; } if BudgetState::check_id(&tx.program_id) { - use instruction::Instruction; + use budget_instruction::Instruction; if let Some(Instruction::NewVote(_vote)) = tx.instruction() { error_counters.account_not_found_vote += 1; } diff --git a/src/instruction.rs b/src/budget_instruction.rs similarity index 100% rename from src/instruction.rs rename to src/budget_instruction.rs diff --git a/src/budget_program.rs b/src/budget_program.rs index 49203ab852..37083bc545 100644 --- a/src/budget_program.rs +++ b/src/budget_program.rs @@ -2,8 +2,8 @@ use bank::Account; use bincode::{self, deserialize, serialize_into, serialized_size}; use budget::Budget; +use budget_instruction::Instruction; use chrono::prelude::{DateTime, Utc}; -use instruction::Instruction; use payment_plan::Witness; use signature::Pubkey; use std::io; diff --git a/src/budget_transaction.rs b/src/budget_transaction.rs index 5dd8f3cc38..254938af30 100644 --- a/src/budget_transaction.rs +++ b/src/budget_transaction.rs @@ -2,10 +2,10 @@ use bincode::{deserialize, serialize}; use budget::{Budget, Condition}; +use budget_instruction::{Contract, Instruction, Vote}; use budget_program::BudgetState; use chrono::prelude::*; use hash::Hash; -use instruction::{Contract, Instruction, Vote}; use payment_plan::Payment; use signature::{Keypair, Pubkey}; use transaction::Transaction; diff --git a/src/crdt.rs b/src/crdt.rs index 958e99b441..e327aa420b 100644 --- a/src/crdt.rs +++ b/src/crdt.rs @@ -13,10 +13,10 @@ //! //! Bank needs to provide an interface for us to query the stake weight use bincode::{deserialize, serialize}; +use budget_instruction::Vote; use choose_gossip_peer_strategy::{ChooseGossipPeerStrategy, ChooseWeightedPeerStrategy}; use counter::Counter; use hash::Hash; -use instruction::Vote; use ledger::LedgerWindow; use log::Level; use netutil::{bind_in_range, bind_to, multi_bind_in_range}; @@ -1398,13 +1398,13 @@ fn report_time_spent(label: &str, time: &Duration, extra: &str) { #[cfg(test)] mod tests { + use budget_instruction::Vote; use crdt::{ Crdt, CrdtError, Node, NodeInfo, Protocol, FULLNODE_PORT_RANGE, GOSSIP_PURGE_MILLIS, GOSSIP_SLEEP_MILLIS, MIN_TABLE_SIZE, }; use entry::Entry; use hash::{hash, Hash}; - use instruction::Vote; use ledger::{LedgerWindow, LedgerWriter}; use logger; use packet::BlobRecycler; diff --git a/src/ledger.rs b/src/ledger.rs index 7ed14b168f..0e5bd260aa 100644 --- a/src/ledger.rs +++ b/src/ledger.rs @@ -3,10 +3,10 @@ //! access read to a persistent file-based ledger. use bincode::{self, deserialize, deserialize_from, serialize_into, serialized_size}; +use budget_instruction::Vote; use budget_transaction::BudgetTransaction; use entry::Entry; use hash::Hash; -use instruction::Vote; use log::Level::Trace; #[cfg(test)] use mint::Mint; @@ -581,11 +581,11 @@ pub fn genesis(name: &str, num: i64) -> (Mint, String) { mod tests { use super::*; use bincode::serialized_size; + use budget_instruction::Vote; use budget_transaction::BudgetTransaction; use chrono::prelude::*; use entry::{next_entry, Entry}; use hash::hash; - use instruction::Vote; use packet::{BlobRecycler, BLOB_DATA_SIZE, PACKET_DATA_SIZE}; use signature::{Keypair, KeypairUtil}; use std; diff --git a/src/lib.rs b/src/lib.rs index c2f66f08b8..1ffb243aa6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,10 +14,10 @@ pub mod banking_stage; pub mod blob_fetch_stage; pub mod broadcast_stage; pub mod budget; +pub mod budget_instruction; pub mod budget_transaction; pub mod choose_gossip_peer_strategy; pub mod client; -pub mod instruction; #[macro_use] pub mod crdt; pub mod budget_program; diff --git a/src/vote_stage.rs b/src/vote_stage.rs index a5d7e8c50c..e89e7b0078 100644 --- a/src/vote_stage.rs +++ b/src/vote_stage.rs @@ -168,10 +168,10 @@ pub mod tests { use super::*; use bank::Bank; use bincode::deserialize; + use budget_instruction::Vote; use crdt::{Crdt, NodeInfo}; use entry::next_entry; use hash::{hash, Hash}; - use instruction::Vote; use logger; use mint::Mint; use std::sync::mpsc::channel;