Hold locks in CHDChain::swap()

This commit is contained in:
UdjinM6 2021-06-23 10:59:57 +03:00
parent 0f17a13b9b
commit 934826d0d2
No known key found for this signature in database
GPG Key ID: 83592BD1400D58D9

View File

@ -74,6 +74,7 @@ public:
// by swapping the members of two classes, // by swapping the members of two classes,
// the two classes are effectively swapped // the two classes are effectively swapped
LOCK2(first.cs, second.cs);
swap(first.nVersion, second.nVersion); swap(first.nVersion, second.nVersion);
swap(first.id, second.id); swap(first.id, second.id);
swap(first.fCrypted, second.fCrypted); swap(first.fCrypted, second.fCrypted);