Skip to content

Commit

Permalink
test: fix descriptors in ismine_tests
Browse files Browse the repository at this point in the history
Some descriptors contain whitespace in public keys
within fragments. This fixes it.
  • Loading branch information
brunoerg committed Jan 15, 2025
1 parent b18fbaf commit de7cdea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/wallet/test/ismine_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
// scriptPubKey multisig - Descriptor
{
CWallet keystore(chain.get(), "", CreateMockableWalletDatabase());
std::string desc_str = "multi(2, " + EncodeSecret(uncompressedKey) + "," + EncodeSecret(keys[1]) + ")";
std::string desc_str = "multi(2," + EncodeSecret(uncompressedKey) + "," + EncodeSecret(keys[1]) + ")";

auto spk_manager = CreateDescriptor(keystore, desc_str, true);

Expand Down Expand Up @@ -462,7 +462,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
{
CWallet keystore(chain.get(), "", CreateMockableWalletDatabase());

std::string desc_str = "sh(multi(2, " + EncodeSecret(uncompressedKey) + "," + EncodeSecret(keys[1]) + "))";
std::string desc_str = "sh(multi(2," + EncodeSecret(uncompressedKey) + "," + EncodeSecret(keys[1]) + "))";

auto spk_manager = CreateDescriptor(keystore, desc_str, true);

Expand Down Expand Up @@ -505,7 +505,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
{
CWallet keystore(chain.get(), "", CreateMockableWalletDatabase());

std::string desc_str = "wsh(multi(2, " + EncodeSecret(keys[0]) + "," + EncodeSecret(keys[1]) + "))";
std::string desc_str = "wsh(multi(2," + EncodeSecret(keys[0]) + "," + EncodeSecret(keys[1]) + "))";

auto spk_manager = CreateDescriptor(keystore, desc_str, true);

Expand Down Expand Up @@ -548,7 +548,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
{
CWallet keystore(chain.get(), "", CreateMockableWalletDatabase());

std::string desc_str = "wsh(multi(2, " + EncodeSecret(uncompressedKey) + "," + EncodeSecret(keys[1]) + "))";
std::string desc_str = "wsh(multi(2," + EncodeSecret(uncompressedKey) + "," + EncodeSecret(keys[1]) + "))";

auto spk_manager = CreateDescriptor(keystore, desc_str, false);
BOOST_CHECK_EQUAL(spk_manager, nullptr);
Expand Down Expand Up @@ -588,7 +588,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
{
CWallet keystore(chain.get(), "", CreateMockableWalletDatabase());

std::string desc_str = "sh(wsh(multi(2, " + EncodeSecret(keys[0]) + "," + EncodeSecret(keys[1]) + ")))";
std::string desc_str = "sh(wsh(multi(2," + EncodeSecret(keys[0]) + "," + EncodeSecret(keys[1]) + ")))";

auto spk_manager = CreateDescriptor(keystore, desc_str, true);

Expand Down

0 comments on commit de7cdea

Please sign in to comment.