use of com.jd.blockchain.ledger.DigitalSignature in project jdchain-core by blockchain-jd-com.
the class TransactionRequestExtensionImpl method resolveSigners.
private void resolveSigners() {
if (request.getEndpointSignatures() != null) {
for (DigitalSignature signature : request.getEndpointSignatures()) {
Credential cred = new Credential(signature);
endpointSignatures.put(cred.getIdentity().getAddress(), cred);
}
}
if (request.getNodeSignatures() != null) {
for (DigitalSignature signature : request.getNodeSignatures()) {
Credential cred = new Credential(signature);
nodeSignatures.put(cred.getIdentity().getAddress(), cred);
}
}
}
use of com.jd.blockchain.ledger.DigitalSignature in project jdchain-core by blockchain-jd-com.
the class LedgerInitializeWebController method getNodesSignatures.
private DigitalSignature[] getNodesSignatures() {
ParticipantNode[] parties = this.ledgerInitConfig.getParticipants();
List<DigitalSignature> signatures = new ArrayList<>();
for (int i = 0; i < parties.length; i++) {
if (parties[i].getParticipantNodeState() != ParticipantNodeState.CONSENSUS) {
continue;
}
PubKey pubKey = parties[i].getPubKey();
SignatureDigest signDigest = this.permissions[i].getTransactionSignature();
signatures.add(new DigitalSignatureBlob(pubKey, signDigest));
}
return signatures.toArray(new DigitalSignature[signatures.size()]);
}
Aggregations