Skip to content

Commit dbec56a

Browse files
committed
tests: fix list_unspent tests
the mtgox address used got too many txs, resulting in a server error: "too many txs" The address is changed with the peter todd sha256 breaking challenge, which should be very difficult to spend :) and as of now has just a few txs
1 parent 20493aa commit dbec56a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

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)