Skip to content

Commit

Permalink
Merge branch 'auxpow'
Browse files Browse the repository at this point in the history
  • Loading branch information
domob1812 committed Feb 16, 2024
2 parents 6d66cdd + e257127 commit 7497370
Show file tree
Hide file tree
Showing 195 changed files with 31,094 additions and 15,001 deletions.
2 changes: 1 addition & 1 deletion .tx/config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com

[o:bitcoin:p:bitcoin:r:qt-translation-026x]
[o:bitcoin:p:bitcoin:r:qt-translation-027x]
file_filter = src/qt/locale/bitcoin_<lang>.xlf
source_file = src/qt/locale/bitcoin_en.xlf
source_lang = en
3 changes: 2 additions & 1 deletion doc/policy/mempool-replacements.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ their in-mempool descendants (together, "original transactions") if, in addition
other consensus and policy rules, each of the following conditions are met:

1. The directly conflicting transactions all signal replaceability explicitly. A transaction is
signaling replaceability if any of its inputs have an nSequence number less than (0xffffffff - 1).
signaling BIP125 replaceability if any of its inputs have an nSequence number less than (0xffffffff - 1).
A transaction also signals replaceibility if its nVersion field is set to 3.

*Rationale*: See [BIP125
explanation](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki#motivation).
Expand Down
4 changes: 4 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ BITCOIN_CORE_H = \
node/validation_cache_args.h \
noui.h \
outputtype.h \
policy/v3_policy.h \
policy/feerate.h \
policy/fees.h \
policy/fees_args.h \
Expand Down Expand Up @@ -455,6 +456,7 @@ libbitcoin_node_a_SOURCES = \
node/utxo_snapshot.cpp \
node/validation_cache_args.cpp \
noui.cpp \
policy/v3_policy.cpp \
policy/fees.cpp \
policy/fees_args.cpp \
policy/packages.cpp \
Expand Down Expand Up @@ -728,6 +730,7 @@ libbitcoin_common_a_SOURCES = \
netbase.cpp \
net_permissions.cpp \
outputtype.cpp \
policy/v3_policy.cpp \
policy/feerate.cpp \
policy/policy.cpp \
protocol.cpp \
Expand Down Expand Up @@ -986,6 +989,7 @@ libbitcoinkernel_la_SOURCES = \
node/blockstorage.cpp \
node/chainstate.cpp \
node/utxo_snapshot.cpp \
policy/v3_policy.cpp \
policy/feerate.cpp \
policy/packages.cpp \
policy/policy.cpp \
Expand Down
10 changes: 8 additions & 2 deletions src/Makefile.qt_locale.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
QT_TS = \
qt/locale/bitcoin_af.ts \
qt/locale/bitcoin_am.ts \
qt/locale/bitcoin_ar.ts \
qt/locale/bitcoin_az.ts \
qt/locale/[email protected] \
qt/locale/bitcoin_be.ts \
Expand Down Expand Up @@ -31,6 +31,7 @@ QT_TS = \
qt/locale/bitcoin_fa.ts \
qt/locale/bitcoin_fi.ts \
qt/locale/bitcoin_fil.ts \
qt/locale/bitcoin_fo.ts \
qt/locale/bitcoin_fr.ts \
qt/locale/bitcoin_fr_CM.ts \
qt/locale/bitcoin_fr_LU.ts \
Expand All @@ -52,6 +53,7 @@ QT_TS = \
qt/locale/bitcoin_ja.ts \
qt/locale/bitcoin_ka.ts \
qt/locale/bitcoin_kk.ts \
qt/locale/[email protected] \
qt/locale/bitcoin_kl.ts \
qt/locale/bitcoin_km.ts \
qt/locale/bitcoin_kn.ts \
Expand All @@ -60,15 +62,18 @@ QT_TS = \
qt/locale/bitcoin_ku_IQ.ts \
qt/locale/bitcoin_ky.ts \
qt/locale/bitcoin_la.ts \
qt/locale/bitcoin_lb.ts \
qt/locale/bitcoin_lt.ts \
qt/locale/bitcoin_lv.ts \
qt/locale/bitcoin_mg.ts \
qt/locale/bitcoin_mi.ts \
qt/locale/bitcoin_mk.ts \
qt/locale/bitcoin_ml.ts \
qt/locale/bitcoin_mn.ts \
qt/locale/bitcoin_mr.ts \
qt/locale/bitcoin_mr_IN.ts \
qt/locale/bitcoin_ms.ts \
qt/locale/bitcoin_mt.ts \
qt/locale/bitcoin_my.ts \
qt/locale/bitcoin_nb.ts \
qt/locale/bitcoin_ne.ts \
Expand All @@ -78,11 +83,12 @@ QT_TS = \
qt/locale/bitcoin_pam.ts \
qt/locale/bitcoin_pl.ts \
qt/locale/bitcoin_pt.ts \
qt/locale/[email protected] \
qt/locale/bitcoin_pt_BR.ts \
qt/locale/bitcoin_ro.ts \
qt/locale/bitcoin_ru.ts \
qt/locale/bitcoin_ru_RU.ts \
qt/locale/bitcoin_sc.ts \
qt/locale/bitcoin_sd.ts \
qt/locale/bitcoin_si.ts \
qt/locale/bitcoin_sk.ts \
qt/locale/bitcoin_sl.ts \
Expand Down
4 changes: 3 additions & 1 deletion src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,9 @@ namecoin_test_check: $(TEST_BINARY) FORCE
namecoin_test_clean : FORCE
rm -f $(CLEAN_BITCOIN_TEST) $(test_test_namecoin_OBJECTS) $(TEST_BINARY)

check-local: $(BITCOIN_TESTS:.cpp=.cpp.test)
check-unit: $(BITCOIN_TESTS:.cpp=.cpp.test)

check-local: check-unit
if BUILD_BITCOIN_TX
@echo "Running test/util/test_runner.py..."
$(PYTHON) $(top_builddir)/test/util/test_runner.py
Expand Down
9 changes: 4 additions & 5 deletions src/addrman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,11 +585,10 @@ bool AddrManImpl::AddSingle(const CAddress& addr, const CNetAddr& source, std::c
return false;

// stochastic test: previous nRefCount == N: 2^N times harder to increase it
int nFactor = 1;
for (int n = 0; n < pinfo->nRefCount; n++)
nFactor *= 2;
if (nFactor > 1 && (insecure_rand.randrange(nFactor) != 0))
return false;
if (pinfo->nRefCount > 0) {
const int nFactor{1 << pinfo->nRefCount};
if (insecure_rand.randrange(nFactor) != 0) return false;
}
} else {
pinfo = Create(addr, source, &nId);
pinfo->nTime = std::max(NodeSeconds{0s}, pinfo->nTime - time_penalty);
Expand Down
6 changes: 3 additions & 3 deletions src/kernel/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,9 +638,9 @@ class CRegTestParams : public CChainParams
{
// For use by test/functional/feature_assumeutxo.py
.height = 299,
.hash_serialized = AssumeutxoHash{uint256S("0x9e2bbbd267ad7d799b43f604aac9818d87c44a0c16f34835b503196b08f8cc72")},
.nChainTx = 300,
.blockhash = uint256S("0x47c8e3b92da89adba6de00f3e5a95169ff13aa73441df90459d2967bb8a883ff")
.hash_serialized = AssumeutxoHash{uint256S("0xf39133c5f4af2fb9211a25a997eef28126b4a5d0e4c00bf81c7c323788473280")},
.nChainTx = 334,
.blockhash = uint256S("0xc3c15dda786337b86b7fa7079d6f83d0d0625b78bf5b697595b1aa448536c2ea")
},
};

Expand Down
2 changes: 1 addition & 1 deletion src/kernel/mempool_persist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ bool DumpMempool(const CTxMemPool& pool, const fs::path& dump_path, FopenFn mock
}
auto last = SteadyClock::now();

LogPrintf("Dumped mempool: %gs to copy, %gs to dump\n",
LogPrintf("Dumped mempool: %.3fs to copy, %.3fs to dump\n",
Ticks<SecondsDouble>(mid - start),
Ticks<SecondsDouble>(last - mid));
} catch (const std::exception& e) {
Expand Down
2 changes: 1 addition & 1 deletion src/policy/fees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ void CBlockPolicyEstimator::FlushUnconfirmed()
_removeTx(mi->first, false); // this calls erase() on mapMemPoolTxs
}
const auto endclear{SteadyClock::now()};
LogPrint(BCLog::ESTIMATEFEE, "Recorded %u unconfirmed txs from mempool in %gs\n", num_entries, Ticks<SecondsDouble>(endclear - startclear));
LogPrint(BCLog::ESTIMATEFEE, "Recorded %u unconfirmed txs from mempool in %.3fs\n", num_entries, Ticks<SecondsDouble>(endclear - startclear));
}

std::chrono::hours CBlockPolicyEstimator::GetFeeEstimatorFileAge()
Expand Down
4 changes: 2 additions & 2 deletions src/policy/rbf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ std::optional<std::string> HasNoNewUnconfirmed(const CTransaction& tx,
}

std::optional<std::string> EntriesAndTxidsDisjoint(const CTxMemPool::setEntries& ancestors,
const std::set<uint256>& direct_conflicts,
const std::set<Txid>& direct_conflicts,
const uint256& txid)
{
for (CTxMemPool::txiter ancestorIt : ancestors) {
const uint256& hashAncestor = ancestorIt->GetTx().GetHash();
const Txid& hashAncestor = ancestorIt->GetTx().GetHash();
if (direct_conflicts.count(hashAncestor)) {
return strprintf("%s spends conflicting transaction %s",
txid.ToString(),
Expand Down
2 changes: 1 addition & 1 deletion src/policy/rbf.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ std::optional<std::string> HasNoNewUnconfirmed(const CTransaction& tx, const CTx
* @returns error message if the sets intersect, std::nullopt if they are disjoint.
*/
std::optional<std::string> EntriesAndTxidsDisjoint(const CTxMemPool::setEntries& ancestors,
const std::set<uint256>& direct_conflicts,
const std::set<Txid>& direct_conflicts,
const uint256& txid);

/** Check that the feerate of the replacement transaction(s) is higher than the feerate of each
Expand Down
Loading

0 comments on commit 7497370

Please sign in to comment.