Refactor IsSpent(nullifier) for Sprout and Sapling domain separation.
We need separate functions for checking Sprout and Sapling nullifiers, because they are in separate domains and aren't guaranteed to be collision-resistant (otherwise there is a possibility of a nullifier collision, however remote, between Sprout and Sapling causing the spend of one to prevent the spend of the other).
This commit is contained in:
@@ -936,7 +936,8 @@ public:
|
||||
bool SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int nConfTheirs, std::vector<COutput> vCoins, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, CAmount& nValueRet) const;
|
||||
|
||||
bool IsSpent(const uint256& hash, unsigned int n) const;
|
||||
bool IsSpent(const uint256& nullifier) const;
|
||||
bool IsSproutSpent(const uint256& nullifier) const;
|
||||
bool IsSaplingSpent(const uint256& nullifier) const;
|
||||
|
||||
bool IsLockedCoin(uint256 hash, unsigned int n) const;
|
||||
void LockCoin(COutPoint& output);
|
||||
|
||||
Reference in New Issue
Block a user