From 0f69838da8541687ec85033b91f32838f21fc883 Mon Sep 17 00:00:00 2001 From: fekt Date: Mon, 26 Feb 2024 11:09:31 -0500 Subject: [PATCH] Revert "Update key_io.cpp" This reverts commit fe92063826dfcb90ded5a7fc3d33a5f0bc9029f7. --- src/key_io.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/key_io.cpp b/src/key_io.cpp index 2498c8195..6cc8f2d33 100644 --- a/src/key_io.cpp +++ b/src/key_io.cpp @@ -347,7 +347,7 @@ std::string KeyIO::EncodeIVK(const libzcash::SaplingIncomingViewingKey& ivk) // See calculation comment below data.reserve((serkey.size() * 8 + 4) / 5); ConvertBits<8, 5, true>([&](unsigned char c) { data.push_back(c); }, serkey.begin(), serkey.end()); - std::string ret = bech32::Encode(m_params.Bech32HRP(CChainParams::SAPLING_INCOMING_VIEWING_KEY), data); + std::string ret = bech32::Encode(keyConstants.Bech32HRP(KeyConstants::SAPLING_INCOMING_VIEWING_KEY), data); memory_cleanse(serkey.data(), serkey.size()); memory_cleanse(data.data(), data.size()); return ret; @@ -357,7 +357,7 @@ libzcash::SaplingIncomingViewingKey KeyIO::DecodeIVK(const std::string& str) { std::vector data; auto bech = bech32::Decode(str); - if (bech.first == m_params.Bech32HRP(CChainParams::SAPLING_INCOMING_VIEWING_KEY) && + if (bech.first == keyConstants.Bech32HRP(KeyConstants::SAPLING_INCOMING_VIEWING_KEY) && bech.second.size() == ConvertedSaplingIncomingViewingKeySize) { // Bech32 decoding data.reserve((bech.second.size() * 5) / 8);