move StateResult to common-types (#11121)
This commit is contained in:
committed by
Andronik Ordian
parent
79a17dedd0
commit
acc5bdfc35
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user