Skip to content

Commit 87348e5

Browse files
Merge #112: Ignore other unrecoverable errors in retry client
7c11f20 Ignore other unrecoverable errors in retry client (Riccardo Casatta) dbec56a tests: fix list_unspent tests (Riccardo Casatta) Pull request description: similar to #107 ACKs for top commit: danielabrozzoni: utACK 7c11f20 Tree-SHA512: 74768e197b754dd98bbd435abaa5bbea018e65103615fba0b874252202c59fee5ec07ca90c0a19e112d3a1351e7ac172bef3bdff2eb97d245eb981c2a58660f9
2 parents 20493aa + 7c11f20 commit 87348e5

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ macro_rules! impl_inner_call {
4949
drop(read_client);
5050
match res {
5151
Ok(val) => return Ok(val),
52-
Err(Error::Protocol(_) | Error::AlreadySubscribed(_)) => {
52+
Err(Error::Protocol(_) | Error::AlreadySubscribed(_) | Error::NotSubscribed(_) | Error::NotSubscribedToHeaders) => {
5353
return res;
5454
},
5555
Err(e) => {

src/raw_client.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,20 +1214,20 @@ mod test {
12141214

12151215
let client = RawClient::new(get_test_server(), None).unwrap();
12161216

1217-
// Mt.Gox hack address
1218-
let addr = bitcoin::Address::from_str("1FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uF").unwrap();
1217+
// Peter todd's sha256 bounty address https://bitcointalk.org/index.php?topic=293382.0
1218+
let addr = bitcoin::Address::from_str("35Snmmy3uhaer2gTboc81ayCip4m9DT4ko").unwrap();
12191219
let resp = client
12201220
.script_list_unspent(&addr.payload.script_pubkey())
12211221
.unwrap();
12221222

1223-
assert!(resp.len() >= 329);
1224-
let txid = "e67a0550848b7932d7796aeea16ab0e48a5cfe81c4e8cca2c5b03e0416850114";
1223+
assert!(resp.len() >= 9);
1224+
let txid = "397f12ee15f8a3d2ab25c0f6bb7d3c64d2038ca056af10dd8251b98ae0f076b0";
12251225
let txid = Txid::from_str(txid).unwrap();
12261226
let txs: Vec<_> = resp.iter().filter(|e| e.tx_hash == txid).collect();
12271227
assert_eq!(txs.len(), 1);
1228-
assert_eq!(txs[0].value, 7995600000000);
1229-
assert_eq!(txs[0].height, 111194);
1230-
assert_eq!(txs[0].tx_pos, 0);
1228+
assert_eq!(txs[0].value, 10000000);
1229+
assert_eq!(txs[0].height, 257674);
1230+
assert_eq!(txs[0].tx_pos, 1);
12311231
}
12321232

12331233
#[test]
@@ -1236,8 +1236,8 @@ mod test {
12361236

12371237
let client = RawClient::new(get_test_server(), None).unwrap();
12381238

1239-
// Mt.Gox hack address
1240-
let script_1 = bitcoin::Address::from_str("1FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uF")
1239+
// Peter todd's sha256 bounty address https://bitcointalk.org/index.php?topic=293382.0
1240+
let script_1 = bitcoin::Address::from_str("35Snmmy3uhaer2gTboc81ayCip4m9DT4ko")
12411241
.unwrap()
12421242
.payload
12431243
.script_pubkey();
@@ -1246,7 +1246,7 @@ mod test {
12461246
.batch_script_list_unspent(vec![script_1.as_script()])
12471247
.unwrap();
12481248
assert_eq!(resp.len(), 1);
1249-
assert!(resp[0].len() >= 329);
1249+
assert!(resp[0].len() >= 9);
12501250
}
12511251

12521252
#[test]

0 commit comments

Comments
 (0)