From c84538643b1326a32083e6deecce41d924c16f2f Mon Sep 17 00:00:00 2001 From: owl352 Date: Tue, 25 Feb 2025 02:59:10 +0300 Subject: [PATCH 01/16] fixes --- client/src/client.rs | 12 ++++++++++-- json/src/lib.rs | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/client/src/client.rs b/client/src/client.rs index c5c23159..db881f76 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -1388,8 +1388,16 @@ pub trait RpcApi: Sized { } /// Returns a returns detailed information about a deterministic masternode - fn get_protx_info(&self, protx_hash: &ProTxHash) -> Result { - let mut args = ["info".into(), into_json(protx_hash)?]; + fn get_protx_info(&self, protx_hash: &ProTxHash, block_hash: Option<&BlockHash>) -> Result { + let mut args = Vec::new(); + + args.push("info".into()); + args.push(into_json(protx_hash)?); + + if !block_hash.is_none() { + args.push(into_json(block_hash.unwrap())?) + } + self.call::("protx", handle_defaults(&mut args, &[null()])) } diff --git a/json/src/lib.rs b/json/src/lib.rs index b495c921..5189315b 100644 --- a/json/src/lib.rs +++ b/json/src/lib.rs @@ -3007,7 +3007,7 @@ pub struct MetaInfo { #[serde(rename_all = "camelCase")] pub struct ProTxInfo { #[serde(rename = "type")] - mn_type: Option, + pub mn_type: Option, #[serde(rename = "proTxHash")] pub pro_tx_hash: ProTxHash, #[serde(with = "hex")] From ec8ad765fc6689845fa95a978ec80050fe9219ac Mon Sep 17 00:00:00 2001 From: owl352 Date: Tue, 25 Feb 2025 04:19:27 +0300 Subject: [PATCH 02/16] fix --- client/src/client.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/client/src/client.rs b/client/src/client.rs index db881f76..71123c8d 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -1389,16 +1389,9 @@ pub trait RpcApi: Sized { /// Returns a returns detailed information about a deterministic masternode fn get_protx_info(&self, protx_hash: &ProTxHash, block_hash: Option<&BlockHash>) -> Result { - let mut args = Vec::new(); + let mut args = ["info".into(), into_json(protx_hash)?, opt_into_json(block_hash)?]; - args.push("info".into()); - args.push(into_json(protx_hash)?); - - if !block_hash.is_none() { - args.push(into_json(block_hash.unwrap())?) - } - - self.call::("protx", handle_defaults(&mut args, &[null()])) + self.call::("protx", handle_defaults(&mut args, &[null(), null()])) } /// Returns a list of provider transactions From 1f8fade38e751609b28b539d8268416f50f705fe Mon Sep 17 00:00:00 2001 From: owl352 Date: Tue, 25 Feb 2025 04:21:54 +0300 Subject: [PATCH 03/16] fix --- client/src/client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/client.rs b/client/src/client.rs index 71123c8d..c21a5d7d 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -1391,7 +1391,7 @@ pub trait RpcApi: Sized { fn get_protx_info(&self, protx_hash: &ProTxHash, block_hash: Option<&BlockHash>) -> Result { let mut args = ["info".into(), into_json(protx_hash)?, opt_into_json(block_hash)?]; - self.call::("protx", handle_defaults(&mut args, &[null(), null()])) + self.call::("protx", handle_defaults(&mut args, &[null()])) } /// Returns a list of provider transactions From 5735f55bf5aa51ac48e35e2273067819b6e43d73 Mon Sep 17 00:00:00 2001 From: owl352 Date: Tue, 25 Feb 2025 06:23:53 +0300 Subject: [PATCH 04/16] fix --- client/src/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/client.rs b/client/src/client.rs index c21a5d7d..ec9beead 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -1388,10 +1388,10 @@ pub trait RpcApi: Sized { } /// Returns a returns detailed information about a deterministic masternode - fn get_protx_info(&self, protx_hash: &ProTxHash, block_hash: Option<&BlockHash>) -> Result { + fn get_protx_info(&self, protx_hash: &ProTxHash, block_hash: Option<&BlockHash>) -> Result { let mut args = ["info".into(), into_json(protx_hash)?, opt_into_json(block_hash)?]; - self.call::("protx", handle_defaults(&mut args, &[null()])) + self.call::("protx", handle_defaults(&mut args, &[null()])) } /// Returns a list of provider transactions From 54f690c7e846375142490f8ea344a35774c70640 Mon Sep 17 00:00:00 2001 From: owl352 Date: Tue, 25 Feb 2025 16:15:09 +0300 Subject: [PATCH 05/16] fix --- client/src/client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/client.rs b/client/src/client.rs index ec9beead..282bff2f 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -1389,7 +1389,7 @@ pub trait RpcApi: Sized { /// Returns a returns detailed information about a deterministic masternode fn get_protx_info(&self, protx_hash: &ProTxHash, block_hash: Option<&BlockHash>) -> Result { - let mut args = ["info".into(), into_json(protx_hash)?, opt_into_json(block_hash)?]; + let mut args = ["info".into(), into_json(protx_hash.to_hex())?, opt_into_json(block_hash)?]; self.call::("protx", handle_defaults(&mut args, &[null()])) } From 7115eb64137c4cfcd3c5d3946cc2eae0c50e01af Mon Sep 17 00:00:00 2001 From: owl352 Date: Thu, 27 Feb 2025 19:36:03 +0300 Subject: [PATCH 06/16] fix version --- client/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/Cargo.toml b/client/Cargo.toml index fe8fe072..3166215e 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -19,7 +19,7 @@ name = "dashcore_rpc" path = "src/lib.rs" [dependencies] -dashcore-rpc-json = { version = "0.16", path = "../json" } +dashcore-rpc-json = { path = "../json" } log = "0.4.5" jsonrpc = "0.14.0" From 2ed5bf642298d519fc0f932036ca335cf9b5687f Mon Sep 17 00:00:00 2001 From: owl352 Date: Thu, 27 Feb 2025 19:37:45 +0300 Subject: [PATCH 07/16] fix version --- client/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/Cargo.toml b/client/Cargo.toml index 3166215e..01e531c2 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -19,7 +19,7 @@ name = "dashcore_rpc" path = "src/lib.rs" [dependencies] -dashcore-rpc-json = { path = "../json" } +dashcore-rpc-json = { version = "0.17", path = "../json" } log = "0.4.5" jsonrpc = "0.14.0" From 047380f19b1c099ae343a9715f5878a2c97e6826 Mon Sep 17 00:00:00 2001 From: owl352 Date: Sat, 29 Mar 2025 17:42:30 +0300 Subject: [PATCH 08/16] fix value_sat type (u32 > u64) --- json/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json/src/lib.rs b/json/src/lib.rs index 5189315b..4634568b 100644 --- a/json/src/lib.rs +++ b/json/src/lib.rs @@ -540,7 +540,7 @@ pub struct GetRawTransactionResultVin { #[serde(default, with = "dashcore::amount::serde::as_btc::opt")] pub value: Option, #[serde(default)] - pub value_sat: Option, + pub value_sat: Option, pub addresses: Option>, pub sequence: u32, } @@ -579,7 +579,7 @@ pub struct GetRawTransactionResultVout { #[serde(with = "dashcore::amount::serde::as_btc")] pub value: Amount, #[serde(rename = "valueSat")] - pub value_sat: u32, + pub value_sat: u64, pub n: u32, #[serde(rename = "scriptPubKey")] pub script_pub_key: GetRawTransactionResultVoutScriptPubKey, From 62e6854a4b88f35fe8588e24edb2fd073d12ffe3 Mon Sep 17 00:00:00 2001 From: owl352 Date: Sat, 29 Mar 2025 17:45:18 +0300 Subject: [PATCH 09/16] fix version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 539c34d8..1f3414fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,4 +7,4 @@ members = [ ] [workspace.package] -version = "0.17.0" +version = "0.16.0" From 54fb1827120702bf118e5b881766ea1eeb2d6c72 Mon Sep 17 00:00:00 2001 From: owl352 Date: Sat, 29 Mar 2025 17:50:41 +0300 Subject: [PATCH 10/16] fix version --- client/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/Cargo.toml b/client/Cargo.toml index 01e531c2..fe8fe072 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -19,7 +19,7 @@ name = "dashcore_rpc" path = "src/lib.rs" [dependencies] -dashcore-rpc-json = { version = "0.17", path = "../json" } +dashcore-rpc-json = { version = "0.16", path = "../json" } log = "0.4.5" jsonrpc = "0.14.0" From f4cbe740951f3884af7ae9c249f6effd62832bc7 Mon Sep 17 00:00:00 2001 From: owl352 Date: Sat, 29 Mar 2025 17:53:41 +0300 Subject: [PATCH 11/16] Revert "fix version" This reverts commit 54fb1827120702bf118e5b881766ea1eeb2d6c72. --- client/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/Cargo.toml b/client/Cargo.toml index fe8fe072..01e531c2 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -19,7 +19,7 @@ name = "dashcore_rpc" path = "src/lib.rs" [dependencies] -dashcore-rpc-json = { version = "0.16", path = "../json" } +dashcore-rpc-json = { version = "0.17", path = "../json" } log = "0.4.5" jsonrpc = "0.14.0" From 650bbbb937ee4db3b8f85032785824832588be91 Mon Sep 17 00:00:00 2001 From: owl352 Date: Sat, 29 Mar 2025 17:53:41 +0300 Subject: [PATCH 12/16] Revert "fix version" This reverts commit 62e6854a4b88f35fe8588e24edb2fd073d12ffe3. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1f3414fc..539c34d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,4 +7,4 @@ members = [ ] [workspace.package] -version = "0.16.0" +version = "0.17.0" From 23ce5ce0ca459805cf119c91ec1dc0ee03d3ed24 Mon Sep 17 00:00:00 2001 From: owl352 Date: Sat, 29 Mar 2025 17:53:41 +0300 Subject: [PATCH 13/16] Revert "fix value_sat type (u32 > u64)" This reverts commit 047380f19b1c099ae343a9715f5878a2c97e6826. --- json/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json/src/lib.rs b/json/src/lib.rs index 4634568b..5189315b 100644 --- a/json/src/lib.rs +++ b/json/src/lib.rs @@ -540,7 +540,7 @@ pub struct GetRawTransactionResultVin { #[serde(default, with = "dashcore::amount::serde::as_btc::opt")] pub value: Option, #[serde(default)] - pub value_sat: Option, + pub value_sat: Option, pub addresses: Option>, pub sequence: u32, } @@ -579,7 +579,7 @@ pub struct GetRawTransactionResultVout { #[serde(with = "dashcore::amount::serde::as_btc")] pub value: Amount, #[serde(rename = "valueSat")] - pub value_sat: u64, + pub value_sat: u32, pub n: u32, #[serde(rename = "scriptPubKey")] pub script_pub_key: GetRawTransactionResultVoutScriptPubKey, From 5e6adf71175fbfb1f92dab1230c30c1767f43b64 Mon Sep 17 00:00:00 2001 From: owl352 Date: Sat, 29 Mar 2025 17:55:05 +0300 Subject: [PATCH 14/16] fix version --- json/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json/src/lib.rs b/json/src/lib.rs index 5189315b..4634568b 100644 --- a/json/src/lib.rs +++ b/json/src/lib.rs @@ -540,7 +540,7 @@ pub struct GetRawTransactionResultVin { #[serde(default, with = "dashcore::amount::serde::as_btc::opt")] pub value: Option, #[serde(default)] - pub value_sat: Option, + pub value_sat: Option, pub addresses: Option>, pub sequence: u32, } @@ -579,7 +579,7 @@ pub struct GetRawTransactionResultVout { #[serde(with = "dashcore::amount::serde::as_btc")] pub value: Amount, #[serde(rename = "valueSat")] - pub value_sat: u32, + pub value_sat: u64, pub n: u32, #[serde(rename = "scriptPubKey")] pub script_pub_key: GetRawTransactionResultVoutScriptPubKey, From 6bbeb5f179755969159b8817a7e24162cb9c298d Mon Sep 17 00:00:00 2001 From: owl352 Date: Sat, 29 Mar 2025 18:08:06 +0300 Subject: [PATCH 15/16] fix --- json/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json/src/lib.rs b/json/src/lib.rs index 5189315b..4634568b 100644 --- a/json/src/lib.rs +++ b/json/src/lib.rs @@ -540,7 +540,7 @@ pub struct GetRawTransactionResultVin { #[serde(default, with = "dashcore::amount::serde::as_btc::opt")] pub value: Option, #[serde(default)] - pub value_sat: Option, + pub value_sat: Option, pub addresses: Option>, pub sequence: u32, } @@ -579,7 +579,7 @@ pub struct GetRawTransactionResultVout { #[serde(with = "dashcore::amount::serde::as_btc")] pub value: Amount, #[serde(rename = "valueSat")] - pub value_sat: u32, + pub value_sat: u64, pub n: u32, #[serde(rename = "scriptPubKey")] pub script_pub_key: GetRawTransactionResultVoutScriptPubKey, From 92ce887265c28d38a730e933e8f2af9514da5b13 Mon Sep 17 00:00:00 2001 From: owl352 Date: Fri, 30 May 2025 01:18:23 +0300 Subject: [PATCH 16/16] update --- json/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/Cargo.toml b/json/Cargo.toml index 6ea04000..5bb46f2d 100644 --- a/json/Cargo.toml +++ b/json/Cargo.toml @@ -25,6 +25,6 @@ serde_with = "2.1.0" serde_repr = "0.1" hex = { version="0.4", features=["serde"]} -dashcore = { git="https://github.com/dashpay/rust-dashcore.git", features=["std", "secp-recovery", "rand-std", "signer", "serde"], default-features = false, tag = "v0.36.2" } +dashcore = { git="https://github.com/dashpay/rust-dashcore.git", features=["std", "secp-recovery", "rand-std", "signer", "serde"], default-features = false, tag = "v0.39.6" } bincode = { version = "2.0.0-rc.3", features = ["serde"] }