Skip to content

Commit

Permalink
Merge pull request nervosnetwork#474 from jjyr/fix-valid-since-rpc
Browse files Browse the repository at this point in the history
fix: valid_since use String instead u64 in RPC
  • Loading branch information
quake committed Apr 15, 2019
2 parents 6250bd8 + 2cdbe4a commit dbfb81c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions util/jsonrpc-types/src/blockchain.rs
Expand Up @@ -114,7 +114,7 @@ impl TryFrom<OutPoint> for CoreOutPoint {
#[derive(Clone, Default, Serialize, Deserialize, PartialEq, Eq, Hash, Debug)]
pub struct CellInput {
pub previous_output: OutPoint,
pub valid_since: u64,
pub valid_since: String,
pub args: Vec<Bytes>,
}

Expand All @@ -123,7 +123,7 @@ impl From<CoreCellInput> for CellInput {
let (previous_output, valid_since, args) = core.destruct();
CellInput {
previous_output: previous_output.into(),
valid_since,
valid_since: valid_since.to_string(),
args: args.into_iter().map(Bytes::new).collect(),
}
}
Expand All @@ -140,7 +140,7 @@ impl TryFrom<CellInput> for CoreCellInput {
} = json;
Ok(CoreCellInput::new(
previous_output.try_into()?,
valid_since,
valid_since.parse::<u64>()?,
args.into_iter().map(Bytes::into_vec).collect(),
))
}
Expand Down

0 comments on commit dbfb81c

Please sign in to comment.