Improve Doxygen for note locking

This commit is contained in:
Greg Pfeil 2023-03-30 14:22:34 -06:00
parent 06553d1399
commit 69ab52cb3e
No known key found for this signature in database
GPG Key ID: 1193ACD196ED61F2
1 changed files with 8 additions and 7 deletions

View File

@ -160,10 +160,6 @@ private:
int anchorHeight;
public:
/**
* This class locks the `SpendableInputs` provided to it. `UnlockSpendable` must be called to
* release them before the instance goes out of scope.
*/
TransactionEffects(
uint32_t anchorConfirmations,
SpendableInputs spendable,
@ -192,13 +188,18 @@ public:
}
/**
* This is automatically called by the constructor, so its not generally necessary to call this
* otherwise.
* This should be called upon creating `TransactionEffects`, it locks exactly the notes that
* will be spent in the built transaction.
*/
void LockSpendable(CWallet& wallet) const;
/**
* This should be called just before the `TransactionEffects` goes out of scope.
* This should be called when we are finished with the transaction (whether it succeeds or
* fails).
*
* TODO: This currently needs to be called while the `TransactionEffects` exists. In future, it
* would be useful to keep these notes locked until we have confirmation that the tx is on
* the chain or not.
*/
void UnlockSpendable(CWallet& wallet) const;