Skip to content

Commit

Permalink
fixup! remove util/translation.h
Browse files Browse the repository at this point in the history
  • Loading branch information
willcl-ark committed Jan 25, 2024
1 parent 07d0a75 commit b0bb72a
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 21 deletions.
2 changes: 0 additions & 2 deletions src/bitcoin-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <chrono>
#include <cmath>
#include <cstdio>
#include <functional>
#include <memory>
#include <optional>
#include <string>
Expand All @@ -49,7 +48,6 @@
// just use a plain system_clock.
using CliClock = std::chrono::system_clock;

const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
UrlDecodeFn* const URL_DECODE = urlDecode;

static const char DEFAULT_RPCCONNECT[] = "127.0.0.1";
Expand Down
2 changes: 0 additions & 2 deletions src/bitcoin-tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@
#include <util/string.h>

#include <cstdio>
#include <functional>
#include <memory>

static bool fCreateBlank;
static std::map<std::string,UniValue> registers;
static const int CONTINUE_EXECUTION=-1;

const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;

static void SetupBitcoinTxArgs(ArgsManager &argsman)
{
Expand Down
4 changes: 0 additions & 4 deletions src/bitcoin-util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,11 @@
#include <util/strencodings.h>

#include <atomic>
#include <cstdio>
#include <functional>
#include <memory>
#include <thread>

static const int CONTINUE_EXECUTION=-1;

const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;

static void SetupBitcoinUtilArgs(ArgsManager &argsman)
{
SetupHelpOptions(argsman);
Expand Down
1 change: 0 additions & 1 deletion src/bitcoin-wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <string>
#include <tuple>

const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
UrlDecodeFn* const URL_DECODE = nullptr;

static void SetupWalletToolArgs(ArgsManager& argsman)
Expand Down
2 changes: 0 additions & 2 deletions src/bitcoind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@
#include <util/tokenpipe.h>

#include <any>
#include <functional>
#include <optional>

using node::NodeContext;

const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
UrlDecodeFn* const URL_DECODE = urlDecode;

#if HAVE_DECL_FORK
Expand Down
7 changes: 0 additions & 7 deletions src/kernel/bitcoinkernel.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
// Copyright (c) 2022 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <functional>
#include <string>

// Define G_TRANSLATION_FUN symbol in libbitcoinkernel library so users of the
// library aren't required to export this symbol
extern const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
1 change: 0 additions & 1 deletion src/test/util/setup_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ using node::LoadChainstate;
using node::RegenerateCommitments;
using node::VerifyLoadedChainstate;

const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
UrlDecodeFn* const URL_DECODE = nullptr;

/** Random context to get unique temp data dirs. Separate from g_insecure_rand_ctx, which can be seeded from a const env var */
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/feebumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ Result CreateRateBumpTransaction(CWallet& wallet, const uint256& txid, const CCo

auto res = CreateTransaction(wallet, recipients, /*change_pos=*/std::nullopt, new_coin_control, false);
if (!res) {
errors.push_back("Unable to create transaction." + util::ErrorString(res));
errors.push_back("Unable to create transaction. " + util::ErrorString(res));
return Result::WALLET_ERROR;
}

Expand Down
2 changes: 1 addition & 1 deletion test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def setup(self):
self.set_binary_paths()

os.environ['PATH'] = os.pathsep.join([
os.path.join(config['environment']['BUILDDIR'], 'src'),
os.path.join(config['environment']['BUILDDIR'], 'src'), os.environ['PATH']
])

# Set up temp directory and start logging
Expand Down

0 comments on commit b0bb72a

Please sign in to comment.