Skip to content

Commit 2633682

Browse files
committed
Update GetPeerInfoResultNetwork for core 22.0
1. add I2p and NotPubliclyRoutable to json::GetPeerInfoResultNetwork 2. update integration_test/run.sh to support versions beginning with 2 3. update .travis.yml to run integration tests with Bitcoin Core 22.0
1 parent 27d3543 commit 2633682

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
env: BITCOINVERSION=0.20.1
2222
- rust: stable
2323
env: BITCOINVERSION=0.21.0
24+
- rust: stable
25+
env: BITCOINVERSION=22.0
2426

2527
script:
2628
- ./contrib/test.sh

integration_test/run.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ PID1=$!
1919
sleep 3
2020

2121
BLOCKFILTERARG=""
22-
if bitcoind -version | grep -q "v0\.\(19\|2\)"; then
22+
if bitcoind -version | grep -q "v\(0\.19\|0\.2\|2\)"; then
2323
BLOCKFILTERARG="-blockfilterindex=1"
2424
fi
2525

2626
FALLBACKFEEARG=""
27-
if bitcoind -version | grep -q "v0\.2"; then
27+
if bitcoind -version | grep -q "v\(0\.2\|2\)"; then
2828
FALLBACKFEEARG="-fallbackfee=0.00001000"
2929
fi
3030

json/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1066,11 +1066,13 @@ 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+
I2p,
1075+
NotPubliclyRoutable,
10741076
// this is undocumented upstream
10751077
Unroutable,
10761078
}

0 commit comments

Comments
 (0)