Commit Graph

3 Commits

Author SHA1 Message Date
UdjinM6
9965d51bb6
Avoid reference leakage in CKeyHolderStorage::AddKey (#1840) 2018-01-09 14:11:43 +03:00
UdjinM6
c532be1c06
Protect CKeyHolderStorage via mutex (#1834) 2018-01-09 12:18:10 +03:00
UdjinM6
33e460f306 Fix losing keys on PrivateSend (#1616)
* reserve colateral keey only if needed

reserve colateral keey only if needed -> fix losing one key on every
subsequent CreateDonominate

* Adding KeyHolder and KeyHolderStorage

Adding KeyHolder and KeyHolderStorage to store keys used in PrivateSend
until status of mixing is known.

* Removing ClearOn... methods. Instead of calling directly KeepAll/ReplaceAll.

* remove usage of shared_ptr

* use unique_ptr

* follow naming convention

* use CKeyHolderStorage in CreateDenominated too

* adjust log messages

* return keys on POOL_STATE_ERROR, keep keys on POOL_STATE_SUCCESS

* Disable copy/assign and allow move

* Use keyHolderStorageDenom for collateral output in CreateDenominated
2017-09-11 17:14:55 +03:00