Skip to content

Commit c1d160b

Browse files
committed
Merge #200: Add new network variants to GetPeerInfoResultNetwork
2fde0f8 Add new network variants to GetPeerInfoResultNetwork (Steve Myers) Pull request description: Added missing network type variants that are found in `bitcoin/src/netbase.cpp` up to version `0.22`. ACKs for top commit: 0xB10C: crACK 2fde0f8 RCasatta: ACK 2fde0f8 Tree-SHA512: dc55be489bb3bd66f906443a3d13be8fb4f4727c03c15155ade423c7ab75663880435dd31cd28ed3e35c52405e688081b759ebeb4ceac710385f90101a8e3dae
2 parents 11fcfcf + 2fde0f8 commit c1d160b

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
@@ -999,7 +999,7 @@ pub struct GetPeerInfoResult {
999999
/// Local address as reported by the peer
10001000
// TODO: use a type for addrlocal
10011001
pub addrlocal: Option<String>,
1002-
/// Network (ipv4, ipv6, or onion) the peer connected throug
1002+
/// Network (ipv4, ipv6, or onion) the peer connected through
10031003
/// Added in Bitcoin Core v0.21
10041004
pub network: Option<GetPeerInfoResultNetwork>,
10051005
/// The services offered
@@ -1067,13 +1067,17 @@ pub struct GetPeerInfoResult {
10671067
}
10681068

10691069
#[derive(Copy, Serialize, Deserialize, Clone, PartialEq, Eq, Debug)]
1070-
#[serde(rename_all = "lowercase")]
1070+
#[serde(rename_all = "snake_case")]
10711071
pub enum GetPeerInfoResultNetwork {
10721072
Ipv4,
10731073
Ipv6,
10741074
Onion,
1075-
// this is undocumented upstream
1075+
#[deprecated]
10761076
Unroutable,
1077+
NotPubliclyRoutable,
1078+
I2p,
1079+
Cjdns,
1080+
Internal,
10771081
}
10781082

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

0 commit comments

Comments
 (0)