Skip to content

Commit ceff972

Browse files
authored
fix: dead links in Rust source files (#1164)
1 parent b8a8925 commit ceff972

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/mempool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ impl Serialize for FeeHistogram {
354354
S: Serializer,
355355
{
356356
let mut seq = serializer.serialize_seq(Some(self.vsize.len()))?;
357-
// https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html#mempool-get-fee-histogram
357+
// https://electrum-protocol.readthedocs.io/en/latest/protocol-methods.html#mempool-get-fee-histogram
358358
let fee_rates =
359359
(0..FeeHistogram::BINS).map(|i| u64::MAX.checked_shr(i as u32).unwrap_or(0));
360360
fee_rates

src/status.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ impl TxEntry {
5252
}
5353

5454
// Confirmation height of a transaction or its mempool state:
55-
// https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html#blockchain-scripthash-get-history
56-
// https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html#blockchain-scripthash-get-mempool
55+
// https://electrum-protocol.readthedocs.io/en/latest/protocol-methods.html#blockchain-scripthash-get-history
56+
// https://electrum-protocol.readthedocs.io/en/latest/protocol-methods.html#blockchain-scripthash-get-mempool
5757
enum Height {
5858
Confirmed { height: usize },
5959
Unconfirmed { has_unconfirmed_inputs: bool },
@@ -89,8 +89,8 @@ impl std::fmt::Display for Height {
8989
}
9090

9191
// A single history entry:
92-
// https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html#blockchain-scripthash-get-history
93-
// https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html#blockchain-scripthash-get-mempool
92+
// https://electrum-protocol.readthedocs.io/en/latest/protocol-methods.html#blockchain-scripthash-get-history
93+
// https://electrum-protocol.readthedocs.io/en/latest/protocol-methods.html#blockchain-scripthash-get-mempool
9494
#[derive(Serialize)]
9595
pub(crate) struct HistoryEntry {
9696
#[serde(rename = "tx_hash")]
@@ -105,7 +105,7 @@ pub(crate) struct HistoryEntry {
105105

106106
impl HistoryEntry {
107107
// Hash to compute ScriptHash status, as defined here:
108-
// https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-basics.html#status
108+
// https://electrum-protocol.readthedocs.io/en/latest/protocol-basics.html#status
109109
fn hash(&self, engine: &mut sha256::HashEngine) {
110110
let s = format!("{}:{}:", self.txid, self.height);
111111
engine.input(s.as_bytes());
@@ -141,7 +141,7 @@ pub struct ScriptHashStatus {
141141
}
142142

143143
/// Specific scripthash balance
144-
/// https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html#blockchain-scripthash-get-balance
144+
/// https://electrum-protocol.readthedocs.io/en/latest/protocol-methods.html#blockchain-scripthash-get-balance
145145
#[derive(Default, Eq, PartialEq, Serialize)]
146146
pub(crate) struct Balance {
147147
#[serde(with = "bitcoin::amount::serde::as_sat", rename = "confirmed")]
@@ -151,7 +151,7 @@ pub(crate) struct Balance {
151151
}
152152

153153
/// A single unspent transaction output entry
154-
/// https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html#blockchain-scripthash-listunspent
154+
/// https://electrum-protocol.readthedocs.io/en/latest/protocol-methods.html#blockchain-scripthash-listunspent
155155
#[derive(Serialize)]
156156
pub(crate) struct UnspentEntry {
157157
height: usize, // 0 = mempool entry
@@ -500,7 +500,7 @@ fn filter_inputs(tx: &Transaction, outpoints: &HashSet<OutPoint>) -> Vec<OutPoin
500500
.collect()
501501
}
502502

503-
// See https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-basics.html#status for details
503+
// See https://electrum-protocol.readthedocs.io/en/latest/protocol-basics.html#status for details
504504
fn compute_status_hash(history: &[HistoryEntry]) -> Option<StatusHash> {
505505
if history.is_empty() {
506506
return None;

src/types.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl HashPrefixRow {
7575
impl_consensus_encoding!(HashPrefixRow, prefix, height);
7676

7777
hash_newtype! {
78-
/// https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-basics.html#script-hashes
78+
/// https://electrum-protocol.readthedocs.io/en/latest/protocol-basics.html#script-hashes
7979
#[hash_newtype(backward)]
8080
pub struct ScriptHash(sha256::Hash);
8181
}
@@ -110,7 +110,7 @@ impl ScriptHashRow {
110110
// ***************************************************************************
111111

112112
hash_newtype! {
113-
/// https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-basics.html#status
113+
/// https://electrum-protocol.readthedocs.io/en/latest/protocol-basics.html#status
114114
pub struct StatusHash(sha256::Hash);
115115
}
116116

0 commit comments

Comments
 (0)