Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix confirmations types #38

Merged
merged 1 commit into from Apr 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions json/src/lib.rs
Expand Up @@ -88,7 +88,7 @@ pub struct AddMultiSigAddressResult {
#[serde(rename_all = "camelCase")]
pub struct GetBlockResult {
pub hash: sha256d::Hash,
pub confirmations: usize,
pub confirmations: u32,
pub size: usize,
pub strippedsize: Option<usize>,
pub weight: usize,
Expand All @@ -115,7 +115,7 @@ pub struct GetBlockResult {
#[serde(rename_all = "camelCase")]
pub struct GetBlockHeaderResult {
pub hash: sha256d::Hash,
pub confirmations: usize,
pub confirmations: u32,
pub height: usize,
pub version: u32,
#[serde(default, with = "::serde_hex::opt")]
Expand Down Expand Up @@ -232,7 +232,7 @@ pub struct GetRawTransactionResult {
pub vin: Vec<GetRawTransactionResultVin>,
pub vout: Vec<GetRawTransactionResultVout>,
pub blockhash: Option<sha256d::Hash>,
pub confirmations: Option<usize>,
pub confirmations: Option<u32>,
pub time: Option<usize>,
pub blocktime: Option<usize>,
}
Expand Down Expand Up @@ -299,7 +299,7 @@ pub struct GetTransactionResult {
pub amount: Amount,
#[serde(default, deserialize_with = "deserialize_amount_opt")]
pub fee: Option<Amount>,
pub confirmations: usize,
pub confirmations: i32,
pub blockhash: sha256d::Hash,
pub blockindex: usize,
pub blocktime: u64,
Expand All @@ -323,7 +323,7 @@ impl GetTransactionResult {
#[serde(rename_all = "camelCase")]
pub struct GetTxOutResult {
pub bestblock: sha256d::Hash,
pub confirmations: usize,
pub confirmations: u32,
#[serde(deserialize_with = "deserialize_amount")]
pub value: Amount,
pub script_pub_key: GetRawTransactionResultVoutScriptPubKey,
Expand All @@ -339,7 +339,7 @@ pub struct ListUnspentResult {
pub script_pub_key: Script,
#[serde(deserialize_with = "deserialize_amount")]
pub amount: Amount,
pub confirmations: usize,
pub confirmations: u32,
pub redeem_script: Option<Script>,
pub spendable: bool,
pub solvable: bool,
Expand Down