|
|
@ -153,16 +153,11 @@ void Controller::fillTxJsonParams(json& allRecepients, Tx tx) |
|
|
|
int sizerandomString = 512; |
|
|
|
const int randomStringLength = sizerandomString; |
|
|
|
|
|
|
|
for(uint8_t i = 0; i < 8; i++) |
|
|
|
{ |
|
|
|
|
|
|
|
for(uint8_t i = 0; i < 8; i++) { |
|
|
|
QString randomString; |
|
|
|
|
|
|
|
QRandomGenerator *gen = QRandomGenerator::system(); |
|
|
|
|
|
|
|
for(int i=0; i<randomStringLength; ++i) |
|
|
|
{ |
|
|
|
|
|
|
|
for(int i=0; i<randomStringLength; ++i) { |
|
|
|
int index = gen->bounded(0, possibleCharacters.length() - 1); |
|
|
|
QChar nextChar = possibleCharacters.at(index); |
|
|
|
randomString.append(nextChar); |
|
|
@ -177,7 +172,6 @@ void Controller::fillTxJsonParams(json& allRecepients, Tx tx) |
|
|
|
it["amount"] = 0; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// For each addr/amt/memo, construct the JSON and also build the confirm dialog box
|
|
|
|
for (int i=0; i < tx.toAddrs.size(); i++) |
|
|
|
{ |
|
|
@ -192,12 +186,9 @@ void Controller::fillTxJsonParams(json& allRecepients, Tx tx) |
|
|
|
|
|
|
|
int decider = rand() % 100 + 1 ; ; // random int between 1 and 100
|
|
|
|
|
|
|
|
if (tx.toAddrs.size() < 2) |
|
|
|
{ |
|
|
|
|
|
|
|
if(decider % 4 == 3) |
|
|
|
{ |
|
|
|
if (tx.toAddrs.size() < 2) { |
|
|
|
|
|
|
|
if(decider % 4 == 3) { |
|
|
|
allRecepients.insert(std::begin(allRecepients), { |
|
|
|
dust.at(0), |
|
|
|
dust.at(1), |
|
|
@ -205,11 +196,9 @@ if(decider % 4 == 3) |
|
|
|
dust.at(3), |
|
|
|
dust.at(4), |
|
|
|
dust.at(5) |
|
|
|
|
|
|
|
}) ; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
} else { |
|
|
|
allRecepients.insert(std::begin(allRecepients), { |
|
|
|
dust.at(0), |
|
|
|
dust.at(1), |
|
|
@ -218,27 +207,19 @@ if(decider % 4 == 3) |
|
|
|
dust.at(4), |
|
|
|
dust.at(5), |
|
|
|
dust.at(6) |
|
|
|
|
|
|
|
}) ; |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
} |
|
|
|
}else{ |
|
|
|
|
|
|
|
if(decider % 4 == 3) |
|
|
|
{ |
|
|
|
|
|
|
|
if(decider % 4 == 3) { |
|
|
|
allRecepients.insert(std::begin(allRecepients), { |
|
|
|
dust.at(0), |
|
|
|
dust.at(1), |
|
|
|
dust.at(2), |
|
|
|
dust.at(3), |
|
|
|
dust.at(4) |
|
|
|
|
|
|
|
|
|
|
|
}) ; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
} else { |
|
|
|
allRecepients.insert(std::begin(allRecepients), { |
|
|
|
dust.at(0), |
|
|
|
dust.at(1), |
|
|
@ -246,11 +227,9 @@ if(decider % 4 == 3) |
|
|
|
dust.at(3), |
|
|
|
dust.at(4), |
|
|
|
dust.at(5) |
|
|
|
|
|
|
|
}) ; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|