Skip to content

Commit 9e924bb

Browse files
committed
Fixed OpenCL bug where incorrect keys would be reported if multiple keys
were found in the same kernel call.
1 parent 0d55dbd commit 9e924bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CLKeySearchDevice/CLKeySearchDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ void CLKeySearchDevice::getResultsInternal()
420420
KeySearchResult minerResult;
421421

422422
// Calculate the private key based on the number of iterations and the current thread
423-
secp256k1::uint256 offset = (secp256k1::uint256((uint64_t)_blocks * _threads * _pointsPerThread * _iterations) + secp256k1::uint256(getPrivateKeyOffset(ptr->thread, ptr->block, ptr->idx))) * _stride;
423+
secp256k1::uint256 offset = (secp256k1::uint256((uint64_t)_blocks * _threads * _pointsPerThread * _iterations) + secp256k1::uint256(getPrivateKeyOffset(ptr[i].thread, ptr[i].block, ptr[i].idx))) * _stride;
424424
secp256k1::uint256 privateKey = secp256k1::addModN(_start, offset);
425425

426426
minerResult.privateKey = privateKey;

0 commit comments

Comments
 (0)