forked from Qortal/qortal
REDUCED_SIGNATURE_LENGTH lowered from 8 to 4
This still gives more than enough uniqueness to prevent mempow nonces from being pre-calculated. Could potentially go even lower still?
This commit is contained in:
parent
abc9cb3958
commit
012cde705a
@ -28,6 +28,8 @@ import java.util.*;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.qortal.transform.Transformer.REDUCED_SIGNATURE_LENGTH;
|
||||
|
||||
public class OnlineAccountsManager extends Thread {
|
||||
|
||||
private class OurOnlineAccountsThread extends Thread {
|
||||
@ -415,7 +417,7 @@ public class OnlineAccountsManager extends Thread {
|
||||
LOGGER.info("Unable to compute online accounts without having a recent block");
|
||||
return false;
|
||||
}
|
||||
byte[] reducedRecentBlockSignature = Arrays.copyOfRange(recentBlockData.getSignature(), 0, 8);
|
||||
byte[] reducedRecentBlockSignature = Arrays.copyOfRange(recentBlockData.getSignature(), 0, REDUCED_SIGNATURE_LENGTH);
|
||||
|
||||
byte[] mempowBytes;
|
||||
try {
|
||||
|
@ -18,7 +18,7 @@ public abstract class Transformer {
|
||||
public static final int SIGNATURE_LENGTH = 64;
|
||||
public static final int TIMESTAMP_LENGTH = LONG_LENGTH;
|
||||
|
||||
public static final int REDUCED_SIGNATURE_LENGTH = 8;
|
||||
public static final int REDUCED_SIGNATURE_LENGTH = 4;
|
||||
|
||||
public static final int MD5_LENGTH = 16;
|
||||
public static final int SHA256_LENGTH = 32;
|
||||
|
Loading…
x
Reference in New Issue
Block a user