From 7cb406e05ac5468c1c5a99e732290b49b8692e49 Mon Sep 17 00:00:00 2001 From: jeffro256 Date: Wed, 2 Apr 2025 11:01:24 -0500 Subject: [PATCH] cryptonote_basic: is_coinbase() take prefix Useful for wallet business logic, which stores the prefixes in `m_transfers`, not the whole transaction. --- src/cryptonote_basic/cryptonote_basic_impl.cpp | 2 +- src/cryptonote_basic/cryptonote_basic_impl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cryptonote_basic/cryptonote_basic_impl.cpp b/src/cryptonote_basic/cryptonote_basic_impl.cpp index 29afe2e010..bd79a7b183 100644 --- a/src/cryptonote_basic/cryptonote_basic_impl.cpp +++ b/src/cryptonote_basic/cryptonote_basic_impl.cpp @@ -172,7 +172,7 @@ namespace cryptonote { return tools::base58::encode_addr(integrated_address_prefix, t_serializable_object_to_blob(iadr)); } //----------------------------------------------------------------------- - bool is_coinbase(const transaction& tx) + bool is_coinbase(const transaction_prefix& tx) { if(tx.vin.size() != 1) return false; diff --git a/src/cryptonote_basic/cryptonote_basic_impl.h b/src/cryptonote_basic/cryptonote_basic_impl.h index d8e954cfb3..0f3c86987c 100644 --- a/src/cryptonote_basic/cryptonote_basic_impl.h +++ b/src/cryptonote_basic/cryptonote_basic_impl.h @@ -108,7 +108,7 @@ namespace cryptonote { , std::function&, bool)> dns_confirm = return_first_address ); - bool is_coinbase(const transaction& tx); + bool is_coinbase(const transaction_prefix& tx); bool operator ==(const cryptonote::transaction& a, const cryptonote::transaction& b); bool operator ==(const cryptonote::block& a, const cryptonote::block& b);