Files
hush3/src/hush_nSPV_impl.cpp
dan_s 3d4e25e429 Split hush unity build: move ~14k lines of implementation from headers into hush_impl.cpp and hush_nSPV_impl.cpp
- Add HUSH_PRIVATE_IMPLEMENTATION guard to hush.h separating implementation from declarations
- Create hush_impl.cpp to compile all hush_*.h implementation as a separate translation unit
- Create hush_nSPV_impl.cpp to compile all hush_nSPV_*.h headers separately
- main.cpp now includes declarations only, no longer a unity build for hush code
- Add both new compilation units to Makefile.am
2026-02-26 20:55:12 -06:00

39 lines
1.4 KiB
C++

// Copyright (c) 2016-2024 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
//
// hush_nSPV_impl.cpp — Compilation unit for nSPV (simplified payment
// verification) implementation headers.
//
// Previously, the nSPV implementation headers were #included directly
// into main.cpp after hush.h. This file replaces that pattern by
// compiling them as a separate object (hush_nSPV_impl.o).
// Standard project headers needed by nSPV code
#include "main.h"
#include "notarizationdb.h"
#include "rpc/server.h"
#include "init.h"
#include "txdb.h"
#include "core_io.h"
#include "key_io.h"
#include "merkleblock.h"
#include "script/sign.h"
#include "cc/CCinclude.h"
#include "wallet/asyncrpcoperation_sendmany.h"
#include "wallet/asyncrpcoperation_shieldcoinbase.h"
// Forward declare functions defined in other compilation units
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey);
// hush.h in declarations-only mode gives us hush function declarations
// that nSPV code calls (dragon_rwnum, dragon_rwbignum, hush_notarized_height, etc.)
#include "hush.h"
// nSPV implementation headers — defines, structs, serialization, then fullnode/superlite/wallet
#include "hush_nSPV_defs.h"
#include "hush_nSPV.h"
#include "hush_nSPV_fullnode.h"
#include "hush_nSPV_superlite.h"
#include "hush_nSPV_wallet.h"