diff --git a/src/rpc/names.cpp b/src/rpc/names.cpp index 474af93c37..65a85fe064 100644 --- a/src/rpc/names.cpp +++ b/src/rpc/names.cpp @@ -3,6 +3,8 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include + #include #include #include @@ -26,8 +28,10 @@ #include #include #include -#include -#include +#ifdef ENABLE_WALLET +# include +# include +#endif #include @@ -133,6 +137,7 @@ addExpirationInfo (const ChainstateManager& chainman, data.pushKV ("expired", expired); } +#ifdef ENABLE_WALLET /** * Adds the "ismine" field giving ownership info to the JSON object. */ @@ -148,6 +153,7 @@ addOwnershipInfo (const CScript& addr, const wallet::CWallet* pwallet, const bool isMine = (mine & wallet::ISMINE_SPENDABLE); data.pushKV ("ismine", isMine); } +#endif // ENABLE_WALLET namespace { diff --git a/src/rpc/names.h b/src/rpc/names.h index 4a61c048e7..e4e97213b4 100644 --- a/src/rpc/names.h +++ b/src/rpc/names.h @@ -1,14 +1,15 @@ -// Copyright (c) 2014-2021 Daniel Kraft +// Copyright (c) 2014-2024 Daniel Kraft // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_RPC_NAMES_H #define BITCOIN_RPC_NAMES_H -#include