Update uses of old Public/PrivateKeyAccount static methods to Crypto

This commit is contained in:
catbref 2020-05-22 17:13:55 +01:00
parent b262044a52
commit bd543a526b
3 changed files with 4 additions and 3 deletions

View File

@ -945,7 +945,7 @@ public class Block {
if (onlineAccounts.remove(onlineAccountData)) // remove() is like contains() but also reduces the number to check next time
continue;
if (!PublicKeyAccount.verify(publicKey, signature, onlineTimestampBytes))
if (!Crypto.verify(publicKey, signature, onlineTimestampBytes))
return ValidationResult.ONLINE_ACCOUNT_SIGNATURE_INCORRECT;
}

View File

@ -169,7 +169,7 @@ public class ChatTransaction extends Transaction {
throw new RuntimeException("Unable to transform transaction to byte array for verification", e);
}
if (!PublicKeyAccount.verify(this.transactionData.getCreatorPublicKey(), signature, transactionBytes))
if (!Crypto.verify(this.transactionData.getCreatorPublicKey(), signature, transactionBytes))
return false;
int nonce = this.chatTransactionData.getNonce();

View File

@ -18,6 +18,7 @@ import org.qortal.account.PublicKeyAccount;
import org.qortal.asset.Asset;
import org.qortal.block.BlockChain;
import org.qortal.controller.Controller;
import org.qortal.crypto.Crypto;
import org.qortal.data.block.BlockData;
import org.qortal.data.group.GroupApprovalData;
import org.qortal.data.group.GroupData;
@ -479,7 +480,7 @@ public abstract class Transaction {
return false;
try {
return PublicKeyAccount.verify(this.transactionData.getCreatorPublicKey(), signature, TransactionTransformer.toBytesForSigning(transactionData));
return Crypto.verify(this.transactionData.getCreatorPublicKey(), signature, TransactionTransformer.toBytesForSigning(transactionData));
} catch (TransformationException e) {
throw new RuntimeException("Unable to transform transaction to byte array for verification", e);
}