Free up term instruction for new multi-instruction feature

This commit is contained in:
Greg Fitzgerald
2018-09-26 10:39:19 -06:00
parent df3b78c18c
commit 7292ece7ad
8 changed files with 9 additions and 9 deletions

View File

@ -326,7 +326,7 @@ impl Bank {
error_counters.account_not_found_leader += 1; error_counters.account_not_found_leader += 1;
} }
if BudgetState::check_id(&tx.program_id) { if BudgetState::check_id(&tx.program_id) {
use instruction::Instruction; use budget_instruction::Instruction;
if let Some(Instruction::NewVote(_vote)) = tx.instruction() { if let Some(Instruction::NewVote(_vote)) = tx.instruction() {
error_counters.account_not_found_vote += 1; error_counters.account_not_found_vote += 1;
} }

View File

@ -2,8 +2,8 @@
use bank::Account; use bank::Account;
use bincode::{self, deserialize, serialize_into, serialized_size}; use bincode::{self, deserialize, serialize_into, serialized_size};
use budget::Budget; use budget::Budget;
use budget_instruction::Instruction;
use chrono::prelude::{DateTime, Utc}; use chrono::prelude::{DateTime, Utc};
use instruction::Instruction;
use payment_plan::Witness; use payment_plan::Witness;
use signature::Pubkey; use signature::Pubkey;
use std::io; use std::io;

View File

@ -2,10 +2,10 @@
use bincode::{deserialize, serialize}; use bincode::{deserialize, serialize};
use budget::{Budget, Condition}; use budget::{Budget, Condition};
use budget_instruction::{Contract, Instruction, Vote};
use budget_program::BudgetState; use budget_program::BudgetState;
use chrono::prelude::*; use chrono::prelude::*;
use hash::Hash; use hash::Hash;
use instruction::{Contract, Instruction, Vote};
use payment_plan::Payment; use payment_plan::Payment;
use signature::{Keypair, Pubkey}; use signature::{Keypair, Pubkey};
use transaction::Transaction; use transaction::Transaction;

View File

@ -13,10 +13,10 @@
//! //!
//! Bank needs to provide an interface for us to query the stake weight //! Bank needs to provide an interface for us to query the stake weight
use bincode::{deserialize, serialize}; use bincode::{deserialize, serialize};
use budget_instruction::Vote;
use choose_gossip_peer_strategy::{ChooseGossipPeerStrategy, ChooseWeightedPeerStrategy}; use choose_gossip_peer_strategy::{ChooseGossipPeerStrategy, ChooseWeightedPeerStrategy};
use counter::Counter; use counter::Counter;
use hash::Hash; use hash::Hash;
use instruction::Vote;
use ledger::LedgerWindow; use ledger::LedgerWindow;
use log::Level; use log::Level;
use netutil::{bind_in_range, bind_to, multi_bind_in_range}; 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)] #[cfg(test)]
mod tests { mod tests {
use budget_instruction::Vote;
use crdt::{ use crdt::{
Crdt, CrdtError, Node, NodeInfo, Protocol, FULLNODE_PORT_RANGE, GOSSIP_PURGE_MILLIS, Crdt, CrdtError, Node, NodeInfo, Protocol, FULLNODE_PORT_RANGE, GOSSIP_PURGE_MILLIS,
GOSSIP_SLEEP_MILLIS, MIN_TABLE_SIZE, GOSSIP_SLEEP_MILLIS, MIN_TABLE_SIZE,
}; };
use entry::Entry; use entry::Entry;
use hash::{hash, Hash}; use hash::{hash, Hash};
use instruction::Vote;
use ledger::{LedgerWindow, LedgerWriter}; use ledger::{LedgerWindow, LedgerWriter};
use logger; use logger;
use packet::BlobRecycler; use packet::BlobRecycler;

View File

@ -3,10 +3,10 @@
//! access read to a persistent file-based ledger. //! access read to a persistent file-based ledger.
use bincode::{self, deserialize, deserialize_from, serialize_into, serialized_size}; use bincode::{self, deserialize, deserialize_from, serialize_into, serialized_size};
use budget_instruction::Vote;
use budget_transaction::BudgetTransaction; use budget_transaction::BudgetTransaction;
use entry::Entry; use entry::Entry;
use hash::Hash; use hash::Hash;
use instruction::Vote;
use log::Level::Trace; use log::Level::Trace;
#[cfg(test)] #[cfg(test)]
use mint::Mint; use mint::Mint;
@ -581,11 +581,11 @@ pub fn genesis(name: &str, num: i64) -> (Mint, String) {
mod tests { mod tests {
use super::*; use super::*;
use bincode::serialized_size; use bincode::serialized_size;
use budget_instruction::Vote;
use budget_transaction::BudgetTransaction; use budget_transaction::BudgetTransaction;
use chrono::prelude::*; use chrono::prelude::*;
use entry::{next_entry, Entry}; use entry::{next_entry, Entry};
use hash::hash; use hash::hash;
use instruction::Vote;
use packet::{BlobRecycler, BLOB_DATA_SIZE, PACKET_DATA_SIZE}; use packet::{BlobRecycler, BLOB_DATA_SIZE, PACKET_DATA_SIZE};
use signature::{Keypair, KeypairUtil}; use signature::{Keypair, KeypairUtil};
use std; use std;

View File

@ -14,10 +14,10 @@ pub mod banking_stage;
pub mod blob_fetch_stage; pub mod blob_fetch_stage;
pub mod broadcast_stage; pub mod broadcast_stage;
pub mod budget; pub mod budget;
pub mod budget_instruction;
pub mod budget_transaction; pub mod budget_transaction;
pub mod choose_gossip_peer_strategy; pub mod choose_gossip_peer_strategy;
pub mod client; pub mod client;
pub mod instruction;
#[macro_use] #[macro_use]
pub mod crdt; pub mod crdt;
pub mod budget_program; pub mod budget_program;

View File

@ -168,10 +168,10 @@ pub mod tests {
use super::*; use super::*;
use bank::Bank; use bank::Bank;
use bincode::deserialize; use bincode::deserialize;
use budget_instruction::Vote;
use crdt::{Crdt, NodeInfo}; use crdt::{Crdt, NodeInfo};
use entry::next_entry; use entry::next_entry;
use hash::{hash, Hash}; use hash::{hash, Hash};
use instruction::Vote;
use logger; use logger;
use mint::Mint; use mint::Mint;
use std::sync::mpsc::channel; use std::sync::mpsc::channel;