aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/transaction.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/transaction.h')
-rw-r--r--src/wallet/transaction.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wallet/transaction.h b/src/wallet/transaction.h
index db858fa5ba..0c28628915 100644
--- a/src/wallet/transaction.h
+++ b/src/wallet/transaction.h
@@ -22,6 +22,10 @@
#include <variant>
#include <vector>
+namespace interfaces {
+class Chain;
+} // namespace interfaces
+
namespace wallet {
//! State of transaction confirmed in a block.
struct TxStateConfirmed {
@@ -326,6 +330,10 @@ public:
template<typename T> const T* state() const { return std::get_if<T>(&m_state); }
template<typename T> T* state() { return std::get_if<T>(&m_state); }
+ //! Update transaction state when attaching to a chain, filling in heights
+ //! of conflicted and confirmed blocks
+ void updateState(interfaces::Chain& chain);
+
bool isAbandoned() const { return state<TxStateInactive>() && state<TxStateInactive>()->abandoned; }
bool isConflicted() const { return state<TxStateConflicted>(); }
bool isInactive() const { return state<TxStateInactive>(); }