move StateResult to common-types (#11121)

This commit is contained in:
Juan Aguilar
2019-10-03 16:52:29 +02:00
committed by Andronik Ordian
parent 79a17dedd0
commit acc5bdfc35
7 changed files with 22 additions and 20 deletions

View File

@@ -56,7 +56,10 @@ use trace::{
localized::LocalizedTrace,
VMTrace,
};
use common_types::data_format::DataFormat;
use common_types::{
data_format::DataFormat,
client_types::StateResult
};
use vm::{LastHashes, Schedule};
/// State information to be used during client query
@@ -68,16 +71,6 @@ pub enum StateOrBlock {
Block(BlockId)
}
/// Result to be used during get address code at given block's state
// todo[botika] move to `common-types`
pub enum StateResult<T> {
/// State is missing
Missing,
/// State is some
Some(T),
}
impl From<Box<dyn StateInfo>> for StateOrBlock {
fn from(info: Box<dyn StateInfo>) -> StateOrBlock {
StateOrBlock::State(info)