From 2334725ec8b67d6058833ff281b72959aeb9e214 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sat, 6 Jul 2024 04:26:44 -0400 Subject: [PATCH] Correct the accidental swap of stagenet/testnet address bytes --- coins/monero/tests/tests.rs | 3 +++ coins/monero/wallet/address/src/lib.rs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 coins/monero/tests/tests.rs diff --git a/coins/monero/tests/tests.rs b/coins/monero/tests/tests.rs new file mode 100644 index 00000000..7b6656f2 --- /dev/null +++ b/coins/monero/tests/tests.rs @@ -0,0 +1,3 @@ +// TODO +#[test] +fn test() {} diff --git a/coins/monero/wallet/address/src/lib.rs b/coins/monero/wallet/address/src/lib.rs index 731faab8..96cbee19 100644 --- a/coins/monero/wallet/address/src/lib.rs +++ b/coins/monero/wallet/address/src/lib.rs @@ -169,11 +169,11 @@ const MONERO_MAINNET_BYTES: AddressBytes = match AddressBytes::new(18, 19, 42, 7 Some(bytes) => bytes, None => panic!("mainnet byte constants conflicted"), }; -const MONERO_STAGENET_BYTES: AddressBytes = match AddressBytes::new(53, 54, 63, 111) { +const MONERO_STAGENET_BYTES: AddressBytes = match AddressBytes::new(24, 25, 36, 86) { Some(bytes) => bytes, None => panic!("stagenet byte constants conflicted"), }; -const MONERO_TESTNET_BYTES: AddressBytes = match AddressBytes::new(24, 25, 36, 86) { +const MONERO_TESTNET_BYTES: AddressBytes = match AddressBytes::new(53, 54, 63, 111) { Some(bytes) => bytes, None => panic!("testnet byte constants conflicted"), };