From acbd6faa78f3bf0803184cbdbb19f964f6af8406 Mon Sep 17 00:00:00 2001 From: marcofleon Date: Tue, 1 Apr 2025 16:12:11 +0100 Subject: [PATCH] Remove implicit conversion functions in `transaction_identifier` --- src/util/transaction_identifier.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/util/transaction_identifier.h b/src/util/transaction_identifier.h index 6b93139f5da..6d6aceca8e8 100644 --- a/src/util/transaction_identifier.h +++ b/src/util/transaction_identifier.h @@ -17,9 +17,6 @@ class transaction_identifier // Note: Use FromUint256 externally instead. transaction_identifier(const uint256& wrapped) : m_wrapped{wrapped} {} - // TODO: Comparisons with uint256 should be disallowed once we have - // converted most of the code to using the new txid types. - constexpr int Compare(const uint256& other) const { return m_wrapped.Compare(other); } constexpr int Compare(const transaction_identifier& other) const { return m_wrapped.Compare(other.m_wrapped); } template constexpr int Compare(const Other& other) const @@ -58,15 +55,6 @@ public: constexpr const std::byte* end() const { return reinterpret_cast(m_wrapped.end()); } template void Serialize(Stream& s) const { m_wrapped.Serialize(s); } template void Unserialize(Stream& s) { m_wrapped.Unserialize(s); } - - /** Conversion function to `uint256`. - * - * Note: new code should use `ToUint256`. - * - * TODO: This should be removed once the majority of the code has switched - * to using the Txid and Wtxid types. Until then it makes for a smoother - * transition to allow this conversion. */ - operator const uint256&() const LIFETIMEBOUND { return m_wrapped; } }; /** Txid commits to all transaction fields except the witness. */