interfaces: typed receive-request APIs #34838

pull MkDev11 wants to merge 1 commits into bitcoin:master from MkDev11:feat/issue-34629-typed-receive-request-api changing 11 files +239 −145
  1. MkDev11 commented at 3:10 AM on March 17, 2026: none

    Right now, RecentRequestsTableModel deserializes raw blobs it gets back from getAddressReceiveRequests() using SpanReader with no try/catch. If anything in the wallet DB is malformed, the GUI crashes on startup — there's no recovery path.

    This PR replaces the two raw-string methods (getAddressReceiveRequests() / setAddressReceiveRequest()) with typed ones:

    • getReceiveRequests() returns a vector<WalletReceiveRequest> instead of opaque blobs
    • addReceiveRequest() lets the wallet assign the ID and timestamp
    • eraseReceiveRequest() is now its own method instead of overloading the setter with an empty string

    Serialization still happens the same way — I added RecipientData / RequestEntryData structs in wallet/interfaces.cpp that are byte-identical to the Qt-side ones, so the DB format doesn't change. The difference is that deserialization is now wrapped in try/catch at the wallet layer, so bad entries get logged and skipped rather than taking down the GUI.

    Closes #34629

  2. DrahtBot added the label interfaces on Mar 17, 2026
  3. DrahtBot commented at 3:10 AM on March 17, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #33034 (wallet: Store transactions in a separate sqlite table by achow101)
    • #32763 (wallet: Replace CWalletTx::mapValue and vOrderForm with explicit class members by achow101)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. hebasto commented at 11:47 AM on March 18, 2026: member
  5. sedited added the label Wallet on Mar 20, 2026
  6. Sjors commented at 2:17 PM on March 24, 2026: member

    Do not submit patches solely to modify the style of existing code.

    https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#coding-style-general

    What do you actually need this for? If it's intended as a bug fix, then it would be good to add a test that compiles but crashes without the fix.

  7. MkDev11 force-pushed on Mar 24, 2026
  8. MkDev11 commented at 9:23 PM on March 24, 2026: none

    Do not submit patches solely to modify the style of existing code.

    https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#coding-style-general

    What do you actually need this for? If it's intended as a bug fix, then it would be good to add a test that compiles but crashes without the fix.

    This is a bug fix, not a style change. I just added the test.

  9. in src/wallet/interfaces.cpp:79 in 9368c6d893
      74 | +    CAmount amount{0};
      75 | +    std::string message;
      76 | +    std::string sPaymentRequest;
      77 | +    std::string authenticatedMerchant;
      78 | +
      79 | +    SERIALIZE_METHODS(RecipientData, obj)
    


    achow101 commented at 10:17 PM on March 31, 2026:

    Interface implementations should not be defining objects with serialization that will end up being written in to the wallet. This should be defined lower down in wallet code.


    MkDev11 commented at 10:50 PM on March 31, 2026:

    fixed

  10. MkDev11 commented at 10:17 PM on March 31, 2026: none

    @achow101 @johnny9 sorry to bother you, can you review the PR and let me know your feedback?

  11. in src/wallet/interfaces.cpp:260 in 9368c6d893 outdated
     254 | @@ -210,27 +255,73 @@ class WalletImpl : public Wallet
     255 |          });
     256 |          return result;
     257 |      }
     258 | -    std::vector<std::string> getAddressReceiveRequests() override {
     259 | +    std::vector<WalletReceiveRequest> getReceiveRequests() override
     260 | +    {
     261 | +        LOCK(m_wallet->cs_wallet);
    


    achow101 commented at 10:17 PM on March 31, 2026:

    Interfaces implementation should not contain significant logic. This should be at a lower level in wallet code. Same with addReceiveRequest.


    MkDev11 commented at 10:51 PM on March 31, 2026:

    fixed

  12. MkDev11 force-pushed on Mar 31, 2026
  13. MkDev11 requested review from achow101 on Mar 31, 2026
  14. MkDev11 force-pushed on Mar 31, 2026
  15. achow101 commented at 10:26 PM on April 2, 2026: member

    Please stop pinging for review. Review will happen when it happens.

  16. MkDev11 closed this on Apr 3, 2026

  17. MkDev11 reopened this on Apr 3, 2026

  18. in src/wallet/receive.cpp:405 in e0e4770fb9
     399 | @@ -393,4 +400,110 @@ std::set< std::set<CTxDestination> > GetAddressGroupings(const CWallet& wallet)
     400 |  
     401 |      return ret;
     402 |  }
     403 | +
     404 | +namespace {
     405 | +//! Serialization-compatible mirror of SendCoinsRecipient (defined in Qt code)
    


    johnny9 commented at 7:10 AM on April 3, 2026:

    I don't think these comments are necessary and they certainly shouldn't refer to the gui.


    MkDev11 commented at 12:05 PM on April 3, 2026:

    removed

  19. in src/qt/recentrequeststablemodel.h:27 in e0e4770fb9 outdated
      26 |  
      27 | -    static const int CURRENT_VERSION = 1;
      28 | -    int nVersion{RecentRequestEntry::CURRENT_VERSION};
      29 |      int64_t id{0};
      30 |      QDateTime date;
      31 |      SendCoinsRecipient recipient;
    


    johnny9 commented at 7:51 AM on April 3, 2026:

    Can we go ahead and remove the recipient SERIALIZE_METHODS too?


    MkDev11 commented at 12:05 PM on April 3, 2026:

    done

  20. MkDev11 force-pushed on Apr 3, 2026
  21. MkDev11 force-pushed on Apr 3, 2026
  22. MkDev11 requested review from johnny9 on Apr 3, 2026
  23. johnny9 commented at 3:48 PM on April 3, 2026: contributor

    Code looks good to me now. I think the final thing to do is add wallet unittests to cover the new wallet methods

  24. MkDev11 force-pushed on Apr 3, 2026
  25. MkDev11 commented at 4:13 PM on April 3, 2026: none

    Code looks good to me now. I think the final thing to do is add wallet unittests to cover the new wallet methods @johnny9 Thanks for your feedbacks, I added the unit tests.

  26. DrahtBot added the label CI failed on Apr 4, 2026
  27. DrahtBot removed the label CI failed on Apr 4, 2026
  28. MkDev11 requested review from johnny9 on Apr 5, 2026
  29. MkDev11 commented at 5:38 PM on April 6, 2026: none

    can you please let me know if there's any other issue?

  30. in src/wallet/receive.cpp:467 in 588b1c0d9f
     462 | +        }
     463 | +    }
     464 | +    return result;
     465 | +}
     466 | +
     467 | +std::optional<int64_t> AddReceiveRequest(CWallet& wallet, const ReceiveRequest& request)
    


    achow101 commented at 7:38 PM on April 6, 2026:

    This is still putting opaque blobs into the wallet. The wallet really should know all of the information it is storing, so SetAddressReceiveRequest should actually be taking ReceiveRequest and this function should not exist.


    MkDev11 commented at 8:24 PM on April 6, 2026:

    done!

  31. in src/wallet/receive.h:57 in 588b1c0d9f
      51 | @@ -52,6 +52,23 @@ Balance GetBalance(const CWallet& wallet, int min_depth = 0, bool avoid_reuse =
      52 |  
      53 |  std::map<CTxDestination, CAmount> GetAddressBalances(const CWallet& wallet);
      54 |  std::set<std::set<CTxDestination>> GetAddressGroupings(const CWallet& wallet) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet);
      55 | +
      56 | +//! Wallet-level receive request data, independent of interface/GUI types.
      57 | +struct ReceiveRequest {
    


    achow101 commented at 7:39 PM on April 6, 2026:

    This should live in wallet.h so that m_address_book can store these objects instead of opaque blobs.


    MkDev11 commented at 8:24 PM on April 6, 2026:

    done!

  32. in src/wallet/receive.cpp:436 in 588b1c0d9f
     431 | +
     432 | +    SERIALIZE_METHODS(RequestEntryData, obj)
     433 | +    {
     434 | +        READWRITE(obj.nVersion, obj.id, obj.date_timet, obj.recipient);
     435 | +    }
     436 | +};
    


    achow101 commented at 7:40 PM on April 6, 2026:

    While this replicates the classes that are used in the GUI, they are ultimately completely unnecessary. There does not need to be a conversion from ReceiveRequest into these structs just for serialization. Furthermore, many of the fields are completely unused and can be serialized as empty dummy strings.


    MkDev11 commented at 8:24 PM on April 6, 2026:

    removed both

  33. in src/wallet/receive.cpp:482 in 588b1c0d9f
     477 | +        for (const auto& [id_str, request_data] : addr_entry.receive_requests) {
     478 | +            if (auto id = ToIntegral<int64_t>(id_str)) {
     479 | +                if (*id > max_id) max_id = *id;
     480 | +            }
     481 | +        }
     482 | +    }
    


    achow101 commented at 7:45 PM on April 6, 2026:

    Instead of calculating the current id every time, we should be calculating it once on startup (when every record is read from disk), and caching it in memory.


    MkDev11 commented at 8:24 PM on April 6, 2026:

    done

  34. achow101 commented at 7:54 PM on April 6, 2026: member

    Overall, this approach still has CWallet holding a map of opaque blobs. However, what should be happening is that serialization of any object needs to be when things are being written to disk. WalletBatch::WriteAddressReceiveRequest should be taking a ReceiveRequest and doing the serialization to write it to disk. Then loading of destdata records should be deserializing into ReceiveRequest objects which are stored in CAddressBookData::receive_requests. That map should be changed to be a std::map<uint64_t, ReceiveRequest>.

  35. MkDev11 force-pushed on Apr 6, 2026
  36. MkDev11 requested review from achow101 on Apr 6, 2026
  37. MkDev11 force-pushed on Apr 6, 2026
  38. in src/wallet/receive.cpp:396 in 764c6e1392
     392 | @@ -393,4 +393,5 @@ std::set< std::set<CTxDestination> > GetAddressGroupings(const CWallet& wallet)
     393 |  
     394 |      return ret;
     395 |  }
     396 | +
    


    achow101 commented at 10:35 PM on April 6, 2026:

    Extra whitespace


    MkDev11 commented at 11:26 PM on April 6, 2026:

    fixed

  39. in src/wallet/receive.h:55 in 764c6e1392
      51 | @@ -52,6 +52,7 @@ Balance GetBalance(const CWallet& wallet, int min_depth = 0, bool avoid_reuse =
      52 |  
      53 |  std::map<CTxDestination, CAmount> GetAddressBalances(const CWallet& wallet);
      54 |  std::set<std::set<CTxDestination>> GetAddressGroupings(const CWallet& wallet) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet);
      55 | +
    


    achow101 commented at 10:35 PM on April 6, 2026:

    Extra whitespace


    MkDev11 commented at 11:26 PM on April 6, 2026:

    fixed

  40. in src/wallet/wallet.cpp:2901 in 764c6e1392
    2910 | -    if (!batch.WriteAddressReceiveRequest(dest, id, value)) return false;
    2911 | -    m_address_book[dest].receive_requests[id] = value;
    2912 | +    if (!batch.WriteAddressReceiveRequest(dest, request)) return false;
    2913 | +    int64_t id = request.id;
    2914 | +    if (id >= m_next_receive_request_id) m_next_receive_request_id = id + 1;
    2915 | +    m_address_book[dest].receive_requests[id] = request;
    


    achow101 commented at 10:36 PM on April 6, 2026:

    To reduce duplication, this could call LoadAddressReceiveRequset.


    MkDev11 commented at 11:27 PM on April 6, 2026:

    done

  41. in src/wallet/wallet.h:832 in 764c6e1392
     828 | @@ -808,9 +829,9 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
     829 |      bool IsAddressPreviouslySpent(const CTxDestination& dest) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
     830 |      bool SetAddressPreviouslySpent(WalletBatch& batch, const CTxDestination& dest, bool used) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
     831 |  
     832 | -    std::vector<std::string> GetAddressReceiveRequests() const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
     833 | -    bool SetAddressReceiveRequest(WalletBatch& batch, const CTxDestination& dest, const std::string& id, const std::string& value) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
     834 | -    bool EraseAddressReceiveRequest(WalletBatch& batch, const CTxDestination& dest, const std::string& id) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
     835 | +    void LoadAddressReceiveRequest(const CTxDestination& dest, int64_t id, ReceiveRequest request) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
    


    achow101 commented at 10:37 PM on April 6, 2026:

    Since id is already in ReceiveRequest, it's not necessary to be passing it in separately.


    MkDev11 commented at 11:27 PM on April 6, 2026:

    done

  42. in src/wallet/walletdb.cpp:972 in 764c6e1392
     966 | @@ -965,8 +967,17 @@ static DBErrors LoadAddressBookRecords(CWallet* pwallet, DatabaseBatch& batch) E
     967 |              pwallet->LoadAddressPreviouslySpent(dest);
     968 |          } else if (strKey.starts_with("rr")) {
     969 |              // Load "rr##" keys where ## is a decimal number, and strValue
     970 | -            // is a serialized RecentRequestEntry object.
     971 | -            pwallet->LoadAddressReceiveRequest(dest, strKey.substr(2), strValue);
     972 | +            // is a serialized receive request.
     973 | +            auto id = ToIntegral<int64_t>(strKey.substr(2));
     974 | +            if (!id || *id <= 0) return DBErrors::LOAD_OK;
    


    achow101 commented at 10:38 PM on April 6, 2026:

    This should be an actual error value, not LOAD_OK. Probably NONCRITICAL_ERROR is appropriate.


    MkDev11 commented at 11:27 PM on April 6, 2026:

    done

  43. in src/wallet/wallet.h:530 in 764c6e1392
     525 | @@ -505,6 +526,9 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
     526 |      std::map<CTxDestination, CAddressBookData> m_address_book GUARDED_BY(cs_wallet);
     527 |      const CAddressBookData* FindAddressBookEntry(const CTxDestination&, bool allow_change = false) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
     528 |  
     529 | +    /** Next available receive request ID, computed on wallet load. */
     530 | +    int64_t m_next_receive_request_id GUARDED_BY(cs_wallet) = 1;
    


    achow101 commented at 10:39 PM on April 6, 2026:

    This should start at 0


    MkDev11 commented at 11:27 PM on April 6, 2026:

    fixed

  44. MkDev11 force-pushed on Apr 6, 2026
  45. MkDev11 requested review from achow101 on Apr 6, 2026
  46. DrahtBot added the label CI failed on Apr 7, 2026
  47. DrahtBot removed the label CI failed on Apr 7, 2026
  48. MkDev11 commented at 3:34 PM on April 7, 2026: none

    please review the changes and let me know your feedback. thanks.

  49. MkDev11 force-pushed on Apr 8, 2026
  50. johnny9 commented at 4:14 AM on April 9, 2026: contributor

    You still need to fix and update the unittests. They currently fail to compile and are still using the old api.

    In file included from /usr/include/boost/test/test_tools.hpp:45,
                     from /usr/include/boost/test/unit_test.hpp:18,
                     from /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:34:
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp: In lambda function:
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:324:57: error: no matching function for call to ‘wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, PKHash, const char [2], const char [9])’
      324 |             BOOST_CHECK(wallet->SetAddressReceiveRequest(batch, PKHash(), "0", "val_rr00"));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:5:
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note: candidate: ‘bool wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, const CTxDestination&, const wallet::ReceiveRequest&)’
      833 |     bool SetAddressReceiveRequest(WalletBatch& batch, const CTxDestination& dest, const ReceiveRequest& request) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note:   candidate expects 3 arguments, 4 provided
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:325:77: error: invalid conversion from ‘const char*’ to ‘int64_t’ {aka ‘long int’} [-fpermissive]
      325 |             BOOST_CHECK(wallet->EraseAddressReceiveRequest(batch, PKHash(), "0"));
          |                                                                             ^~~
          |                                                                             |
          |                                                                             const char*
    /home/johnny/github/bitcoin/src/wallet/wallet.h:834:93: note:   initializing argument 3 of ‘bool wallet::CWallet::EraseAddressReceiveRequest(wallet::WalletBatch&, const CTxDestination&, int64_t)’
      834 |     bool EraseAddressReceiveRequest(WalletBatch& batch, const CTxDestination& dest, int64_t id) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
          |                                                                                     ~~~~~~~~^~
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:326:57: error: no matching function for call to ‘wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, PKHash, const char [2], const char [9])’
      326 |             BOOST_CHECK(wallet->SetAddressReceiveRequest(batch, PKHash(), "1", "val_rr10"));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note: candidate: ‘bool wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, const CTxDestination&, const wallet::ReceiveRequest&)’
      833 |     bool SetAddressReceiveRequest(WalletBatch& batch, const CTxDestination& dest, const ReceiveRequest& request) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note:   candidate expects 3 arguments, 4 provided
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:327:57: error: no matching function for call to ‘wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, PKHash, const char [2], const char [9])’
      327 |             BOOST_CHECK(wallet->SetAddressReceiveRequest(batch, PKHash(), "1", "val_rr11"));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note: candidate: ‘bool wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, const CTxDestination&, const wallet::ReceiveRequest&)’
      833 |     bool SetAddressReceiveRequest(WalletBatch& batch, const CTxDestination& dest, const ReceiveRequest& request) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note:   candidate expects 3 arguments, 4 provided
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:328:57: error: no matching function for call to ‘wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, ScriptHash, const char [2], const char [9])’
      328 |             BOOST_CHECK(wallet->SetAddressReceiveRequest(batch, ScriptHash(), "2", "val_rr20"));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note: candidate: ‘bool wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, const CTxDestination&, const wallet::ReceiveRequest&)’
      833 |     bool SetAddressReceiveRequest(WalletBatch& batch, const CTxDestination& dest, const ReceiveRequest& request) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note:   candidate expects 3 arguments, 4 provided
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp: In lambda function:
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:333:37: error: ‘using std::__shared_ptr_access<wallet::CWallet, __gnu_cxx::_S_atomic, false, false>::element_type = class wallet::CWallet’ {aka ‘class wallet::CWallet’} has no member named ‘GetAddressReceiveRequests’; did you mean ‘SetAddressReceiveRequest’?
      333 |             auto requests = wallet->GetAddressReceiveRequests();
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
          |                                     SetAddressReceiveRequest
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp: In lambda function:
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:345:37: error: ‘using std::__shared_ptr_access<wallet::CWallet, __gnu_cxx::_S_atomic, false, false>::element_type = class wallet::CWallet’ {aka ‘class wallet::CWallet’} has no member named ‘GetAddressReceiveRequests’; did you mean ‘SetAddressReceiveRequest’?
      345 |             auto requests = wallet->GetAddressReceiveRequests();
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
          |                                     SetAddressReceiveRequest
    gmake[3]: *** [src/test/CMakeFiles/test_bitcoin.dir/build.make:2170: src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/wallet_tests.cpp.o] Error 1
    gmake[2]: *** [CMakeFiles/Makefile2:1546: src/test/CMakeFiles/test_bitcoin.dir/all] Error 2
    gmake[1]: *** [CMakeFiles/Makefile2:1553: src/test/CMakeFiles/test_bitcoin.dir/rule] Error 2
    
  51. MkDev11 force-pushed on Apr 9, 2026
  52. MkDev11 commented at 4:41 AM on April 9, 2026: none

    You still need to fix and update the unittests. They currently fail to compile and are still using the old api.

    In file included from /usr/include/boost/test/test_tools.hpp:45,
                     from /usr/include/boost/test/unit_test.hpp:18,
                     from /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:34:
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp: In lambda function:
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:324:57: error: no matching function for call to ‘wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, PKHash, const char [2], const char [9])’
      324 |             BOOST_CHECK(wallet->SetAddressReceiveRequest(batch, PKHash(), "0", "val_rr00"));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:5:
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note: candidate: ‘bool wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, const CTxDestination&, const wallet::ReceiveRequest&)’
      833 |     bool SetAddressReceiveRequest(WalletBatch& batch, const CTxDestination& dest, const ReceiveRequest& request) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note:   candidate expects 3 arguments, 4 provided
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:325:77: error: invalid conversion from ‘const char*’ to ‘int64_t’ {aka ‘long int’} [-fpermissive]
      325 |             BOOST_CHECK(wallet->EraseAddressReceiveRequest(batch, PKHash(), "0"));
          |                                                                             ^~~
          |                                                                             |
          |                                                                             const char*
    /home/johnny/github/bitcoin/src/wallet/wallet.h:834:93: note:   initializing argument 3 of ‘bool wallet::CWallet::EraseAddressReceiveRequest(wallet::WalletBatch&, const CTxDestination&, int64_t)’
      834 |     bool EraseAddressReceiveRequest(WalletBatch& batch, const CTxDestination& dest, int64_t id) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
          |                                                                                     ~~~~~~~~^~
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:326:57: error: no matching function for call to ‘wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, PKHash, const char [2], const char [9])’
      326 |             BOOST_CHECK(wallet->SetAddressReceiveRequest(batch, PKHash(), "1", "val_rr10"));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note: candidate: ‘bool wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, const CTxDestination&, const wallet::ReceiveRequest&)’
      833 |     bool SetAddressReceiveRequest(WalletBatch& batch, const CTxDestination& dest, const ReceiveRequest& request) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note:   candidate expects 3 arguments, 4 provided
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:327:57: error: no matching function for call to ‘wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, PKHash, const char [2], const char [9])’
      327 |             BOOST_CHECK(wallet->SetAddressReceiveRequest(batch, PKHash(), "1", "val_rr11"));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note: candidate: ‘bool wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, const CTxDestination&, const wallet::ReceiveRequest&)’
      833 |     bool SetAddressReceiveRequest(WalletBatch& batch, const CTxDestination& dest, const ReceiveRequest& request) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note:   candidate expects 3 arguments, 4 provided
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:328:57: error: no matching function for call to ‘wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, ScriptHash, const char [2], const char [9])’
      328 |             BOOST_CHECK(wallet->SetAddressReceiveRequest(batch, ScriptHash(), "2", "val_rr20"));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note: candidate: ‘bool wallet::CWallet::SetAddressReceiveRequest(wallet::WalletBatch&, const CTxDestination&, const wallet::ReceiveRequest&)’
      833 |     bool SetAddressReceiveRequest(WalletBatch& batch, const CTxDestination& dest, const ReceiveRequest& request) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    /home/johnny/github/bitcoin/src/wallet/wallet.h:833:10: note:   candidate expects 3 arguments, 4 provided
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp: In lambda function:
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:333:37: error: ‘using std::__shared_ptr_access<wallet::CWallet, __gnu_cxx::_S_atomic, false, false>::element_type = class wallet::CWallet’ {aka ‘class wallet::CWallet’} has no member named ‘GetAddressReceiveRequests’; did you mean ‘SetAddressReceiveRequest’?
      333 |             auto requests = wallet->GetAddressReceiveRequests();
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
          |                                     SetAddressReceiveRequest
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp: In lambda function:
    /home/johnny/github/bitcoin/src/wallet/test/wallet_tests.cpp:345:37: error: ‘using std::__shared_ptr_access<wallet::CWallet, __gnu_cxx::_S_atomic, false, false>::element_type = class wallet::CWallet’ {aka ‘class wallet::CWallet’} has no member named ‘GetAddressReceiveRequests’; did you mean ‘SetAddressReceiveRequest’?
      345 |             auto requests = wallet->GetAddressReceiveRequests();
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
          |                                     SetAddressReceiveRequest
    gmake[3]: *** [src/test/CMakeFiles/test_bitcoin.dir/build.make:2170: src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/wallet_tests.cpp.o] Error 1
    gmake[2]: *** [CMakeFiles/Makefile2:1546: src/test/CMakeFiles/test_bitcoin.dir/all] Error 2
    gmake[1]: *** [CMakeFiles/Makefile2:1553: src/test/CMakeFiles/test_bitcoin.dir/rule] Error 2
    

    I removed the test file in the previous commit, that's why you got the error. just pushed the test file.

  53. DrahtBot added the label CI failed on Apr 9, 2026
  54. DrahtBot removed the label CI failed on Apr 9, 2026
  55. MkDev11 requested review from johnny9 on Apr 14, 2026
  56. MkDev11 commented at 9:24 PM on April 14, 2026: none

    could you please let me know what i need to update or fix?

  57. sedited commented at 9:40 AM on April 20, 2026: contributor

    Can you squash your commits?

  58. replace raw string receive-request APIs with typed methods 9e717b9f2b
  59. MkDev11 force-pushed on Apr 20, 2026
  60. MkDev11 commented at 12:13 PM on April 20, 2026: none

    Can you squash your commits?

    done


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me