mirror of
https://github.com/Qortal/qortal.git
synced 2025-02-12 18:25:49 +00:00
Add static method to extract generatorSignature from block reference
This commit is contained in:
parent
ce2dc9b8ad
commit
c05fe58676
@ -277,8 +277,12 @@ public class BlockTransformer extends Transformer {
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] getReferenceGeneratorSignature(byte[] blockReference) {
|
||||
return Arrays.copyOf(blockReference, GENERATOR_SIGNATURE_LENGTH);
|
||||
}
|
||||
|
||||
public static byte[] getBytesForGeneratorSignature(BlockData blockData) throws TransformationException {
|
||||
byte[] generatorSignature = Arrays.copyOf(blockData.getReference(), GENERATOR_SIGNATURE_LENGTH);
|
||||
byte[] generatorSignature = getReferenceGeneratorSignature(blockData.getReference());
|
||||
PublicKeyAccount generator = new PublicKeyAccount(null, blockData.getGeneratorPublicKey());
|
||||
|
||||
return getBytesForGeneratorSignature(generatorSignature, blockData.getGeneratingBalance(), generator);
|
||||
|
Loading…
x
Reference in New Issue
Block a user