Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Missing Headers - Linker Errors [DO NOT MERGE] #300

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from
12 changes: 6 additions & 6 deletions Builds/CMake/RippledCore.cmake
Expand Up @@ -433,13 +433,17 @@ target_sources (rippled PRIVATE
src/ripple/app/tx/impl/CancelOffer.cpp
src/ripple/app/tx/impl/CashCheck.cpp
src/ripple/app/tx/impl/Change.cpp
src/ripple/app/tx/impl/ClaimReward.cpp
src/ripple/app/tx/impl/CreateCheck.cpp
src/ripple/app/tx/impl/CreateOffer.cpp
src/ripple/app/tx/impl/CreateTicket.cpp
src/ripple/app/tx/impl/DeleteAccount.cpp
src/ripple/app/tx/impl/DepositPreauth.cpp
src/ripple/app/tx/impl/Escrow.cpp
src/ripple/app/tx/impl/GenesisMint.cpp
src/ripple/app/tx/impl/Import.cpp
src/ripple/app/tx/impl/InvariantCheck.cpp
src/ripple/app/tx/impl/Invoke.cpp
src/ripple/app/tx/impl/NFTokenAcceptOffer.cpp
src/ripple/app/tx/impl/NFTokenBurn.cpp
src/ripple/app/tx/impl/NFTokenCancelOffer.cpp
Expand All @@ -448,14 +452,10 @@ target_sources (rippled PRIVATE
src/ripple/app/tx/impl/OfferStream.cpp
src/ripple/app/tx/impl/PayChan.cpp
src/ripple/app/tx/impl/Payment.cpp
src/ripple/app/tx/impl/Remit.cpp
src/ripple/app/tx/impl/SetAccount.cpp
src/ripple/app/tx/impl/SetRegularKey.cpp
src/ripple/app/tx/impl/SetHook.cpp
src/ripple/app/tx/impl/ClaimReward.cpp
src/ripple/app/tx/impl/GenesisMint.cpp
src/ripple/app/tx/impl/Import.cpp
src/ripple/app/tx/impl/Invoke.cpp
src/ripple/app/tx/impl/Remit.cpp
src/ripple/app/tx/impl/SetRegularKey.cpp
src/ripple/app/tx/impl/SetSignerList.cpp
src/ripple/app/tx/impl/SetTrust.cpp
src/ripple/app/tx/impl/SignerEntries.cpp
Expand Down
5 changes: 5 additions & 0 deletions src/ripple/app/hook/impl/applyHook.cpp
@@ -1,12 +1,17 @@
#include <ripple/app/hook/applyHook.h>
#include <ripple/app/ledger/OpenLedger.h>
#include <ripple/app/ledger/TransactionMaster.h>
#include <ripple/app/misc/HashRouter.h>
#include <ripple/app/misc/NetworkOPs.h>
#include <ripple/app/misc/Transaction.h>
#include <ripple/app/misc/TxQ.h>
#include <ripple/app/tx/impl/Import.h>
#include <ripple/app/tx/impl/details/NFTokenUtils.h>
#include <ripple/basics/Log.h>
#include <ripple/basics/Slice.h>
#include <ripple/protocol/ErrorCodes.h>
#include <ripple/protocol/TxFlags.h>
#include <ripple/protocol/st.h>
#include <ripple/protocol/tokens.h>
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <any>
Expand Down
1 change: 1 addition & 0 deletions src/ripple/app/misc/NegativeUNLVote.cpp
Expand Up @@ -19,6 +19,7 @@

#include <ripple/app/consensus/RCLValidations.h>
#include <ripple/app/ledger/Ledger.h>
#include <ripple/app/main/Application.h>
#include <ripple/app/misc/NegativeUNLVote.h>

namespace ripple {
Expand Down
1 change: 1 addition & 0 deletions src/ripple/app/tx/impl/GenesisMint.cpp
Expand Up @@ -23,6 +23,7 @@
#include <ripple/ledger/View.h>
#include <ripple/protocol/Feature.h>
#include <ripple/protocol/Indexes.h>
#include <ripple/protocol/st.h>

namespace ripple {

Expand Down
1 change: 1 addition & 0 deletions src/ripple/app/tx/impl/Import.cpp
Expand Up @@ -30,6 +30,7 @@
#include <ripple/protocol/Indexes.h>
#include <ripple/protocol/PublicKey.h>
#include <ripple/protocol/STTx.h>
#include <ripple/protocol/st.h>
#include <algorithm>
#include <charconv>
#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions src/ripple/app/tx/impl/Invoke.cpp
Expand Up @@ -22,6 +22,7 @@
#include <ripple/ledger/View.h>
#include <ripple/protocol/Feature.h>
#include <ripple/protocol/Indexes.h>
#include <ripple/protocol/st.h>

namespace ripple {

Expand Down
3 changes: 3 additions & 0 deletions src/ripple/app/tx/impl/Remit.cpp
Expand Up @@ -23,6 +23,9 @@
#include <ripple/ledger/View.h>
#include <ripple/protocol/Feature.h>
#include <ripple/protocol/Indexes.h>
#include <ripple/protocol/TxFlags.h>
#include <ripple/protocol/st.h>

namespace ripple {

TxConsequences
Expand Down
10 changes: 6 additions & 4 deletions src/ripple/app/tx/impl/SetSignerList.cpp
Expand Up @@ -153,8 +153,10 @@ SetSignerList::preCompute()
// NOTE: This way of computing the OwnerCount associated with a SignerList
// is valid until the featureMultiSignReserve amendment passes. Once it
// passes then just 1 OwnerCount is associated with a SignerList.
static int
signerCountBasedOwnerCountDelta(std::size_t entryCount, Rules const& rules)
int
SetSignerList::signerCountBasedOwnerCountDelta(
std::size_t entryCount,
Rules const& rules)
{
// We always compute the full change in OwnerCount, taking into account:
// o The fact that we're adding/removing a SignerList and
Expand All @@ -176,8 +178,8 @@ signerCountBasedOwnerCountDelta(std::size_t entryCount, Rules const& rules)
return 2 + static_cast<int>(entryCount);
}

static TER
removeSignersFromLedger(
TER
SetSignerList::removeSignersFromLedger(
Application& app,
ApplyView& view,
Keylet const& accountKeylet,
Expand Down
12 changes: 12 additions & 0 deletions src/ripple/app/tx/impl/SetSignerList.h
Expand Up @@ -71,6 +71,18 @@ class SetSignerList : public Transactor
AccountID const& account,
beast::Journal j);

static TER
removeSignersFromLedger(
Application& app,
ApplyView& view,
Keylet const& accountKeylet,
Keylet const& ownerDirKeylet,
Keylet const& signerListKeylet,
beast::Journal j);

static int
signerCountBasedOwnerCountDelta(std::size_t entryCount, Rules const& rules);

private:
static void
writeSignersToSLE(
Expand Down
3 changes: 3 additions & 0 deletions src/ripple/app/tx/impl/applySteps.cpp
Expand Up @@ -23,6 +23,7 @@
#include <ripple/app/tx/impl/CancelOffer.h>
#include <ripple/app/tx/impl/CashCheck.h>
#include <ripple/app/tx/impl/Change.h>
#include <ripple/app/tx/impl/ClaimReward.h>
#include <ripple/app/tx/impl/CreateCheck.h>
#include <ripple/app/tx/impl/CreateOffer.h>
#include <ripple/app/tx/impl/CreateTicket.h>
Expand All @@ -39,12 +40,14 @@
#include <ripple/app/tx/impl/NFTokenMint.h>
#include <ripple/app/tx/impl/PayChan.h>
#include <ripple/app/tx/impl/Payment.h>
#include <ripple/app/tx/impl/Remit.h>
#include <ripple/app/tx/impl/SetAccount.h>
#include <ripple/app/tx/impl/SetHook.h>
#include <ripple/app/tx/impl/SetRegularKey.h>
#include <ripple/app/tx/impl/SetSignerList.h>
#include <ripple/app/tx/impl/SetTrust.h>
#include <ripple/app/tx/impl/URIToken.h>
#include <ripple/app/tx/impl/XahauGenesis.h>

namespace ripple {

Expand Down
1 change: 1 addition & 0 deletions src/ripple/ledger/impl/ApplyViewBase.cpp
Expand Up @@ -19,6 +19,7 @@

#include <ripple/basics/contract.h>
#include <ripple/ledger/detail/ApplyViewBase.h>
#include <ripple/protocol/STAccount.h>

namespace ripple {
namespace detail {
Expand Down
3 changes: 1 addition & 2 deletions src/ripple/protocol/STValidation.h
Expand Up @@ -171,8 +171,7 @@ STValidation::STValidation(
{
if (checkSignature && !isValid())
{
JLOG(debugLog().error()) << "Invalid signature in validation: "
<< getJson(JsonOptions::none);
JLOG(debugLog().error()) << "Invalid signature in validation";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still want the hex if not the json dumped under this condition, otherwise we wouldnt know which validation/signature was invalid if we had to debug with this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree I marked it as DNM. Still figuring out the solution.

Throw<std::runtime_error>("Invalid signature in validation");
}

Expand Down
1 change: 1 addition & 0 deletions src/ripple/rpc/handlers/ServerInfo.cpp
Expand Up @@ -19,6 +19,7 @@

#include <ripple/app/main/Application.h>
#include <ripple/app/misc/NetworkOPs.h>
#include <ripple/app/reporting/P2pProxy.h>
#include <ripple/protocol/jss.h>
#include <ripple/rpc/Context.h>
#include <ripple/rpc/Role.h>
Expand Down
2 changes: 2 additions & 0 deletions src/test/app/ClaimReward_test.cpp
Expand Up @@ -17,7 +17,9 @@
*/
//==============================================================================

#include <ripple/app/ledger/LedgerMaster.h>
#include <ripple/protocol/Feature.h>
#include <ripple/protocol/jss.h>
#include <test/jtx.h>

namespace ripple {
Expand Down
14 changes: 5 additions & 9 deletions src/test/app/GenesisMint_test.cpp
Expand Up @@ -15,8 +15,8 @@
*/
//==============================================================================

#include <ripple/app/tx/impl/XahauGenesis.h>
#include <ripple/protocol/Feature.h>
#include <ripple/protocol/jss.h>
#include <optional>
#include <test/jtx.h>

Expand Down Expand Up @@ -94,7 +94,7 @@ struct GenesisMint_test : public beast::unit_test::suite
using namespace jtx;
using namespace std::literals::chrono_literals;

Env env{*this, envconfig(), features, nullptr};
Env env{*this, envconfig(), features};
auto const alice = Account("alice");
auto const bob = Account("bob");
auto const invoker = Account("invoker");
Expand Down Expand Up @@ -133,11 +133,7 @@ struct GenesisMint_test : public beast::unit_test::suite
using namespace jtx;
using namespace std::literals::chrono_literals;

Env env{*this, envconfig(), features, nullptr};
// Env env{*this, envconfig(), features, nullptr,
// // beast::severities::kWarning
// beast::severities::kTrace
// };
Env env{*this, envconfig(), features};
auto const alice = Account("alice");
auto const bob = Account("bob");
auto const invoker = Account("invoker");
Expand Down Expand Up @@ -639,7 +635,7 @@ struct GenesisMint_test : public beast::unit_test::suite
using namespace jtx;
using namespace std::literals::chrono_literals;

Env env{*this, envconfig(), features, nullptr};
Env env{*this, envconfig(), features};
auto const alice = Account("alice");
auto const bob = Account("bob");
env.fund(XRP(10000), alice, bob);
Expand All @@ -661,7 +657,7 @@ struct GenesisMint_test : public beast::unit_test::suite
using namespace jtx;
using namespace std::literals::chrono_literals;

Env env{*this, envconfig(), features, nullptr};
Env env{*this, envconfig(), features};
auto const alice = Account("alice");
auto const bob = Account("bob");
env.fund(XRP(10000), alice, bob);
Expand Down
1 change: 1 addition & 0 deletions src/test/app/Invoke_test.cpp
Expand Up @@ -17,6 +17,7 @@
*/
//==============================================================================

#include <ripple/protocol/jss.h>
#include <test/jtx.h>

namespace ripple {
Expand Down
1 change: 0 additions & 1 deletion src/test/app/Remit_test.cpp
Expand Up @@ -2132,7 +2132,6 @@ struct Remit_test : public beast::unit_test::suite
auto const delta = USD(100);
env(remit::remit(alice, bob), remit::amts({delta}));
env.close();
auto xferRate = transferRate(*env.current(), gw);
auto const postAlice = env.balance(alice, USD.issue());
BEAST_EXPECT(env.balance(bob, USD.issue()) == preBob + delta);
BEAST_EXPECT(to_string(postAlice.value()) == tc.result);
Expand Down
8 changes: 8 additions & 0 deletions src/test/app/SetHookTSH_test.cpp
Expand Up @@ -18,6 +18,7 @@
*/
//==============================================================================

#include <ripple/app/hook/Enum.h>
#include <ripple/app/misc/HashRouter.h>
#include <ripple/app/misc/TxQ.h>
#include <ripple/app/tx/apply.h>
Expand All @@ -31,6 +32,13 @@
namespace ripple {
namespace test {

#define BEAST_REQUIRE(x) \
{ \
BEAST_EXPECT(!!(x)); \
if (!(x)) \
return; \
}

struct SetHookTSH_test : public beast::unit_test::suite
{
private:
Expand Down
1 change: 1 addition & 0 deletions src/test/jtx/impl/acctdelete.cpp
Expand Up @@ -17,6 +17,7 @@
*/
//==============================================================================

#include <ripple/protocol/jss.h>
#include <test/jtx/Env.h>
#include <test/jtx/acctdelete.h>

Expand Down
1 change: 1 addition & 0 deletions src/test/jtx/impl/escrow.cpp
Expand Up @@ -17,6 +17,7 @@
*/
//==============================================================================

#include <ripple/protocol/TxFlags.h>
#include <ripple/protocol/jss.h>
#include <test/jtx/escrow.h>

Expand Down
1 change: 1 addition & 0 deletions src/test/jtx/impl/network.cpp
Expand Up @@ -17,6 +17,7 @@
*/
//==============================================================================

#include <ripple/basics/StringUtilities.h>
#include <ripple/json/json_reader.h>
#include <ripple/json/json_writer.h>
#include <ripple/protocol/Feature.h>
Expand Down
1 change: 1 addition & 0 deletions src/test/jtx/impl/paychan.cpp
Expand Up @@ -17,6 +17,7 @@
*/
//==============================================================================

#include <ripple/protocol/TxFlags.h>
#include <ripple/protocol/jss.h>
#include <test/jtx/paychan.h>

Expand Down
1 change: 1 addition & 0 deletions src/test/jtx/offer.h
Expand Up @@ -23,6 +23,7 @@
#include <ripple/json/json_value.h>
#include <ripple/protocol/STAmount.h>
#include <test/jtx/Account.h>
#include <test/jtx/Env.h>

namespace ripple {
namespace test {
Expand Down
1 change: 1 addition & 0 deletions src/test/rpc/ServerDefinitions_test.cpp
Expand Up @@ -19,6 +19,7 @@

#include <ripple/app/misc/AmendmentTable.h>
#include <ripple/beast/unit_test.h>
#include <ripple/json/json_reader.h>
#include <ripple/protocol/Feature.h>
#include <ripple/protocol/jss.h>
#include <test/jtx.h>
Expand Down