Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,17 @@ pub const LIQUID_TESTNET_PARAMS: address::AddressParams = address::AddressParams
blech_hrp: "tlq",
};

/// Magic for testnet4, 0x1c163f28 (from BIP94) with flipped endianness.
#[cfg(not(feature = "liquid"))]
const TESTNET4_MAGIC: u32 = 0x283f161c;

impl Network {
#[cfg(not(feature = "liquid"))]
pub fn magic(self) -> u32 {
BNetwork::from(self).magic()
match self {
Self::Testnet4 => TESTNET4_MAGIC,
_ => BNetwork::from(self).magic(),
}
}

#[cfg(feature = "liquid")]
Expand Down
2 changes: 0 additions & 2 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ case "${1}" in
;;
testnet4)
NETWORK=testnet4
MAGIC=283f161c
THREADS=$((NPROC / 6))
;;
signet)
Expand Down Expand Up @@ -157,7 +156,6 @@ do
--precache-threads "${THREADS}" \
--cookie "${RPC_USER}:${RPC_PASS}" \
--cors '*' \
--magic "${MAGIC}" \
--address-search \
--utxos-limit "${UTXOS_LIMIT}" \
--electrum-txs-limit "${ELECTRUM_TXS_LIMIT}" \
Expand Down