Skip to content

Commit db0ab99

Browse files
committed
[Sapling] Use CChainParams::Bech32HRP() in zs_address_test
Coming from 69aa0d8f28cd36e71de7b7101faf405492afae59
1 parent 9dfdf20 commit db0ab99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/librust/sapling_key_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ BOOST_AUTO_TEST_CASE(ps_address_test)
2020
auto sk = libzcash::SaplingSpendingKey::random();
2121
{
2222
std::string sk_string = KeyIO::EncodeSpendingKey(sk);
23-
BOOST_CHECK(sk_string.compare(0, 26, "p-secret-spending-key-main") == 0);
23+
BOOST_CHECK(sk_string.compare(0, 26, Params().Bech32HRP(CChainParams::SAPLING_SPENDING_KEY)) == 0);
2424

2525
auto spendingkey2 = KeyIO::DecodeSpendingKey(sk_string);
2626
BOOST_CHECK(IsValidSpendingKey(spendingkey2));
@@ -33,7 +33,7 @@ BOOST_AUTO_TEST_CASE(ps_address_test)
3333
libzcash::SaplingPaymentAddress addr = sk.default_address();
3434

3535
std::string addr_string = KeyIO::EncodePaymentAddress(addr);
36-
BOOST_CHECK(addr_string.compare(0, 2, "ps") == 0);
36+
BOOST_CHECK(addr_string.compare(0, 2, Params().Bech32HRP(CChainParams::SAPLING_PAYMENT_ADDRESS)) == 0);
3737

3838
auto paymentaddr2 = KeyIO::DecodePaymentAddress(addr_string);
3939
BOOST_CHECK(IsValidPaymentAddress(paymentaddr2));

0 commit comments

Comments
 (0)