Skip to content

Commit 2fde0f8

Browse files
committed
Add new network variants to GetPeerInfoResultNetwork
1 parent 54a427f commit 2fde0f8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

json/src/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ pub struct GetPeerInfoResult {
998998
/// Local address as reported by the peer
999999
// TODO: use a type for addrlocal
10001000
pub addrlocal: Option<String>,
1001-
/// Network (ipv4, ipv6, or onion) the peer connected throug
1001+
/// Network (ipv4, ipv6, or onion) the peer connected through
10021002
/// Added in Bitcoin Core v0.21
10031003
pub network: Option<GetPeerInfoResultNetwork>,
10041004
/// The services offered
@@ -1066,13 +1066,17 @@ pub struct GetPeerInfoResult {
10661066
}
10671067

10681068
#[derive(Copy, Serialize, Deserialize, Clone, PartialEq, Eq, Debug)]
1069-
#[serde(rename_all = "lowercase")]
1069+
#[serde(rename_all = "snake_case")]
10701070
pub enum GetPeerInfoResultNetwork {
10711071
Ipv4,
10721072
Ipv6,
10731073
Onion,
1074-
// this is undocumented upstream
1074+
#[deprecated]
10751075
Unroutable,
1076+
NotPubliclyRoutable,
1077+
I2p,
1078+
Cjdns,
1079+
Internal,
10761080
}
10771081

10781082
#[derive(Copy, Serialize, Deserialize, Clone, PartialEq, Eq, Debug)]

0 commit comments

Comments
 (0)