Skip to content

Commit a7253d9

Browse files
committed
Merge #517: Fix a few missed cases of "vXY and later only" in types
c803543 Remove deprecated field from getpeerinfo (Jamil Lambert, PhD) 8202a20 Tidy up docs (Jamil Lambert, PhD) Pull request description: #513 missed a few cases of "vXY and later only" comments that had different wording and didn't come up in the grep. Do a more general search and fix what is found. One of the fields in types for `PeerInfo` was marked as "(deprecated in v0.21)" and set as an option in v22 and v26. The field is not in the RPC docs for either v22 or v26 and the tests pass with it being removed. - Remove the deprecated `whitelisted` field from `PeerInfo`. - Tidy up the docs. ACKs for top commit: tcharding: ACK c803543 Tree-SHA512: 2c7c9ab2ff42dc42718d8128bf555baddc2ab9dd1f13fa1d9001108393c9f564252e1a781edab66696d3aebdfd3a9f1bd7278914b009b73e441114e4bf1783e3
2 parents b06b361 + c803543 commit a7253d9

File tree

10 files changed

+18
-27
lines changed

10 files changed

+18
-27
lines changed

types/src/v17/wallet/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,6 @@ pub struct GetAddressInfo {
251251
#[serde(rename = "hdseedid")]
252252
pub hd_seed_id: Option<String>,
253253
/// Alias for hdseedid maintained for backwards compatibility.
254-
///
255-
/// Will be removed in V0.18.
256254
#[serde(rename = "hdmasterkeyid")]
257255
pub hd_master_key_id: Option<String>,
258256
/// Array of labels associated with the address.

types/src/v20/wallet/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ pub struct GetTransaction {
209209
/// The time received in seconds since epoch (1 Jan 1970 GMT).
210210
#[serde(rename = "timereceived")]
211211
pub time_received: u32,
212-
/// If a comment is associated with the transaction, only present if not empty. v20 to v24 only.
212+
/// If a comment is associated with the transaction, only present if not empty.
213213
pub comment: Option<String>,
214214
/// Whether this transaction could be replaced due to BIP125 (replace-by-fee);
215215
/// may be unknown for unconfirmed transactions not in the mempool

types/src/v22/network.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ pub struct PeerInfo {
131131
pub addresses_rate_limited: usize,
132132
/// Any special permissions that have been granted to this peer.
133133
pub permissions: Vec<String>,
134-
/// Whether the peer is whitelisted.
135-
pub whitelisted: Option<bool>,
136134
/// The minimum fee rate for transactions this peer accepts.
137135
#[serde(rename = "minfeefilter")]
138136
pub min_fee_filter: Option<f64>, // Docs rekon this exists.

types/src/v26/blockchain/into.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::model;
1111
use crate::v25::ScanBlocksStartError;
1212

1313
impl GetChainStates {
14-
/// Converts v26 GetChainStates (and its ChainState subtypes) to model::GetChainStates
14+
/// Converts version specific type to a version nonspecific, more strongly typed type.
1515
pub fn into_model(self) -> Result<model::GetChainStates, GetChainStatesError> {
1616
use GetChainStatesError as E;
1717

types/src/v26/network.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ pub struct PeerInfo {
139139
/// The minimum fee rate for transactions this peer accepts.
140140
#[serde(rename = "minfeefilter")]
141141
pub minimum_fee_filter: f64,
142-
/// Whether the peer is whitelisted (deprecated in v0.21).
143-
pub whitelisted: Option<bool>,
144142
/// The total bytes sent aggregated by message type.
145143
#[serde(rename = "bytessent_per_msg")]
146144
pub bytes_sent_per_message: BTreeMap<String, u64>,

types/src/v26/wallet/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub struct GetTransaction {
114114
/// The time received in seconds since epoch (1 Jan 1970 GMT).
115115
#[serde(rename = "timereceived")]
116116
pub time_received: u32,
117-
/// If a comment is associated with the transaction, only present if not empty. v20 to v24 only.
117+
/// If a comment is associated with the transaction, only present if not empty.
118118
pub comment: Option<String>,
119119
/// Whether this transaction could be replaced due to BIP125 (replace-by-fee);
120120
/// may be unknown for unconfirmed transactions not in the mempool

types/src/v28/network.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub struct GetNetworkInfo {
5555
/// List of local addresses.
5656
#[serde(rename = "localaddresses")]
5757
pub local_addresses: Vec<GetNetworkInfoAddress>,
58-
/// Any network and blockchain warnings. Before v28 this was a single String.
58+
/// Any network and blockchain warnings.
5959
pub warnings: Vec<String>,
6060
}
6161

types/src/v29/blockchain/into.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ impl GetBlockHeaderVerbose {
355355
}
356356

357357
impl GetChainStates {
358-
/// Converts v26 GetChainStates (and its ChainState subtypes) to model::GetChainStates
358+
/// Converts version specific type to a version nonspecific, more strongly typed type.
359359
pub fn into_model(self) -> Result<model::GetChainStates, GetChainStatesError> {
360360
use GetChainStatesError as E;
361361

types/src/v29/blockchain/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ pub struct GetBlockHeaderVerbose {
364364
pub nonce: i64,
365365
/// The bits.
366366
pub bits: String,
367-
/// The difficulty target (hex-encoded). From v29+.
367+
/// The difficulty target (hex-encoded).
368368
pub target: String,
369369
/// The difficulty.
370370
pub difficulty: f64,

types/src/v29/hidden/mod.rs

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,20 @@ pub struct GetOrphanTxsVerboseOne(pub Vec<GetOrphanTxsVerboseOneEntry>);
3434
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
3535
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
3636
pub struct GetOrphanTxsVerboseOneEntry {
37-
/// The transaction hash in hex
37+
/// The transaction hash in hex.
3838
pub txid: String,
39-
/// The transaction witness hash in hex
39+
/// The transaction witness hash in hex.
4040
pub wtxid: String,
41-
/// The serialized transaction size in bytes
41+
/// The serialized transaction size in bytes.
4242
pub bytes: u64,
4343
/// The virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
4444
pub vsize: u64,
4545
/// The transaction weight as defined in BIP 141.
4646
pub weight: u64,
47-
/// The entry time into the orphanage expressed in UNIX epoch time
48-
/// Only present in v29.
47+
/// The entry time into the orphanage expressed in UNIX epoch time.
4948
#[serde(rename = "entry")]
5049
pub entry_time: u32,
51-
/// The orphan expiration time expressed in UNIX epoch time
52-
/// Only present in v29.
50+
/// The orphan expiration time expressed in UNIX epoch time.
5351
#[serde(rename = "expiration")]
5452
pub expiration_time: u32,
5553
/// List of peer ids that we store this transaction for.
@@ -68,24 +66,23 @@ pub struct GetOrphanTxsVerboseTwo(pub Vec<GetOrphanTxsVerboseTwoEntry>);
6866
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
6967
#[cfg_attr(feature = "serde-deny-unknown-fields", serde(deny_unknown_fields))]
7068
pub struct GetOrphanTxsVerboseTwoEntry {
71-
/// The transaction hash in hex
69+
/// The transaction hash in hex.
7270
pub txid: String,
73-
/// The transaction witness hash in hex
71+
/// The transaction witness hash in hex.
7472
pub wtxid: String,
75-
/// The serialized transaction size in bytes
73+
/// The serialized transaction size in bytes.
7674
pub bytes: u64,
77-
/// The virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.
75+
/// The virtual transaction size as defined in BIP 141. This is different from actual serialized
76+
/// size for witness transactions as witness data is discounted.
7877
pub vsize: u64,
7978
/// The transaction weight as defined in BIP 141.
8079
pub weight: u64,
8180
/// List of peer ids that we store this transaction for.
8281
pub from: Vec<u64>,
83-
/// The entry time into the orphanage expressed in UNIX epoch time
84-
/// Only present in v29.
82+
/// The entry time into the orphanage expressed in UNIX epoch time.
8583
#[serde(rename = "entry")]
8684
pub entry_time: u32,
87-
/// The orphan expiration time expressed in UNIX epoch time
88-
/// Only present in v29.
85+
/// The orphan expiration time expressed in UNIX epoch time.
8986
#[serde(rename = "expiration")]
9087
pub expiration_time: u32,
9188
/// The serialized, hex-encoded transaction data.

0 commit comments

Comments
 (0)