10: Fix stopping criteria in perform_work(), fixed KeyRange bug
This commit is contained in:
parent
c30e92cb63
commit
5295a24313
3 changed files with 3 additions and 2 deletions
|
@ -82,6 +82,7 @@ void Brainflyer::performWork(comm::Work& work) {
|
|||
secp256k1_ec_pubkey_batch_incr(4096, nopt_mod, pub_batch, priv_batch, priv);
|
||||
keys += 4096;
|
||||
memcpy(priv, priv_batch[4096 - 1], 32); // set next starting key
|
||||
priv_add_uint32(priv, nopt_mod);
|
||||
|
||||
int i = checkBatch(pub_batch, 4096);
|
||||
if (i != -1) {
|
||||
|
|
|
@ -35,7 +35,7 @@ int main() {
|
|||
thread* threads = new thread[numThreads];
|
||||
cout << "Starting " << numThreads << " threads" << endl;
|
||||
|
||||
//numThreads = 1;
|
||||
numThreads = 1;
|
||||
for (unsigned int i = 0; i < numThreads; i++) {
|
||||
threads[i] = thread{bf::Brainflyer(i, "127.0.0.1", 26765, key)};
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class MultiStagedServer implements KeyServer {
|
|||
KeyRange kr = null;
|
||||
|
||||
if ( (kr = keyRangeBuffer.getRange()) == null) { // Get retracted KR from buffer if one exists
|
||||
secKTS.getRange(); // else: get a random range from the subspace
|
||||
kr = secKTS.getRange(); // else: get a random range from the subspace
|
||||
}
|
||||
|
||||
if (kr == null) { // sub-range finished
|
||||
|
|
Loading…
Reference in a new issue