Add methods to store SaplingOutPoint in setLockedSaplingNotes
This commit is contained in:
@@ -3858,6 +3858,37 @@ std::vector<JSOutPoint> CWallet::ListLockedSproutNotes()
|
|||||||
return vOutpts;
|
return vOutpts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CWallet::LockNote(const SaplingOutPoint& output)
|
||||||
|
{
|
||||||
|
AssertLockHeld(cs_wallet);
|
||||||
|
setLockedSaplingNotes.insert(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CWallet::UnlockNote(const SaplingOutPoint& output)
|
||||||
|
{
|
||||||
|
AssertLockHeld(cs_wallet);
|
||||||
|
setLockedSaplingNotes.erase(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CWallet::UnlockAllSaplingNotes()
|
||||||
|
{
|
||||||
|
AssertLockHeld(cs_wallet);
|
||||||
|
setLockedSaplingNotes.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CWallet::IsLockedNote(const SaplingOutPoint& output) const
|
||||||
|
{
|
||||||
|
AssertLockHeld(cs_wallet);
|
||||||
|
return (setLockedSaplingNotes.count(output) > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<SaplingOutPoint> CWallet::ListLockedSaplingNotes()
|
||||||
|
{
|
||||||
|
AssertLockHeld(cs_wallet);
|
||||||
|
std::vector<SaplingOutPoint> vOutputs(setLockedSaplingNotes.begin(), setLockedSaplingNotes.end());
|
||||||
|
return vOutputs;
|
||||||
|
}
|
||||||
|
|
||||||
/** @} */ // end of Actions
|
/** @} */ // end of Actions
|
||||||
|
|
||||||
class CAffectedKeysVisitor : public boost::static_visitor<void> {
|
class CAffectedKeysVisitor : public boost::static_visitor<void> {
|
||||||
|
|||||||
@@ -942,6 +942,7 @@ public:
|
|||||||
|
|
||||||
std::set<COutPoint> setLockedCoins;
|
std::set<COutPoint> setLockedCoins;
|
||||||
std::set<JSOutPoint> setLockedSproutNotes;
|
std::set<JSOutPoint> setLockedSproutNotes;
|
||||||
|
std::set<SaplingOutPoint> setLockedSaplingNotes;
|
||||||
|
|
||||||
int64_t nTimeFirstKey;
|
int64_t nTimeFirstKey;
|
||||||
|
|
||||||
@@ -963,13 +964,17 @@ public:
|
|||||||
void UnlockAllCoins();
|
void UnlockAllCoins();
|
||||||
void ListLockedCoins(std::vector<COutPoint>& vOutpts);
|
void ListLockedCoins(std::vector<COutPoint>& vOutpts);
|
||||||
|
|
||||||
|
|
||||||
bool IsLockedNote(const JSOutPoint& outpt) const;
|
bool IsLockedNote(const JSOutPoint& outpt) const;
|
||||||
void LockNote(const JSOutPoint& output);
|
void LockNote(const JSOutPoint& output);
|
||||||
void UnlockNote(const JSOutPoint& output);
|
void UnlockNote(const JSOutPoint& output);
|
||||||
void UnlockAllSproutNotes();
|
void UnlockAllSproutNotes();
|
||||||
std::vector<JSOutPoint> ListLockedSproutNotes();
|
std::vector<JSOutPoint> ListLockedSproutNotes();
|
||||||
|
|
||||||
|
bool IsLockedNote(const SaplingOutPoint& output) const;
|
||||||
|
void LockNote(const SaplingOutPoint& output);
|
||||||
|
void UnlockNote(const SaplingOutPoint& output);
|
||||||
|
void UnlockAllSaplingNotes();
|
||||||
|
std::vector<SaplingOutPoint> ListLockedSaplingNotes();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* keystore implementation
|
* keystore implementation
|
||||||
|
|||||||
Reference in New Issue
Block a user