byte[] codePackage) { ChaincodeID.Builder chaincodeIDBuilder = ChaincodeID.newBuilder().setName(name).setVersion(chaincodeVersion); if (chaincodePath != null) { chaincodeIDBuilder = chaincodeIDBuilder.setPath(chaincodePath); .append(ccType.name()) .append(", name:") .append(chaincodeID.getName()) .append(", path: ") .append(chaincodeID.getPath()) .append(", version: ") .append(chaincodeID.getVersion());
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeAction)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeAction other = (org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeAction) obj; boolean result = true; result = result && getResults() .equals(other.getResults()); result = result && getEvents() .equals(other.getEvents()); result = result && (hasResponse() == other.hasResponse()); if (hasResponse()) { result = result && getResponse() .equals(other.getResponse()); } result = result && (hasChaincodeId() == other.hasChaincodeId()); if (hasChaincodeId()) { result = result && getChaincodeId() .equals(other.getChaincodeId()); } return result; }
/** * <pre> * This field contains the ChaincodeID of executing this invocation. Endorser * will set it with the ChaincodeID called by endorser while simulating proposal. * Committer will validate the version matching with latest chaincode version. * Adding ChaincodeID to keep version opens up the possibility of multiple * ChaincodeAction per transaction. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 4;</code> */ public org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeIDOrBuilder getChaincodeIdOrBuilder() { if (chaincodeIdBuilder_ != null) { return chaincodeIdBuilder_.getMessageOrBuilder(); } else { return chaincodeId_ == null ? org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.getDefaultInstance() : chaincodeId_; } } /**
/** * <pre> * This field contains the ChaincodeID of executing this invocation. Endorser * will set it with the ChaincodeID called by endorser while simulating proposal. * Committer will validate the version matching with latest chaincode version. * Adding ChaincodeID to keep version opens up the possibility of multiple * ChaincodeAction per transaction. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 4;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec) obj; boolean result = true; result = result && type_ == other.type_; result = result && (hasChaincodeId() == other.hasChaincodeId()); if (hasChaincodeId()) { result = result && getChaincodeId() .equals(other.getChaincodeId()); } result = result && (hasInput() == other.hasInput()); if (hasInput()) { result = result && getInput() .equals(other.getInput()); } result = result && (getTimeout() == other.getTimeout()); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction other = (org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeAction) obj; boolean result = true; result = result && getResults() .equals(other.getResults()); result = result && getEvents() .equals(other.getEvents()); result = result && (hasResponse() == other.hasResponse()); if (hasResponse()) { result = result && getResponse() .equals(other.getResponse()); } result = result && (hasChaincodeId() == other.hasChaincodeId()); if (hasChaincodeId()) { result = result && getChaincodeId() .equals(other.getChaincodeId()); } return result; }
/** * <pre> * This field contains the ChaincodeID of executing this invocation. Endorser * will set it with the ChaincodeID called by endorser while simulating proposal. * Committer will validate the version matching with latest chaincode version. * Adding ChaincodeID to keep version opens up the possibility of multiple * ChaincodeAction per transaction. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 4;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeAction)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeAction other = (org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeAction) obj; boolean result = true; result = result && getResults() .equals(other.getResults()); result = result && getEvents() .equals(other.getEvents()); result = result && (hasResponse() == other.hasResponse()); if (hasResponse()) { result = result && getResponse() .equals(other.getResponse()); } result = result && (hasChaincodeId() == other.hasChaincodeId()); if (hasChaincodeId()) { result = result && getChaincodeId() .equals(other.getChaincodeId()); } return result; }
/** * <pre> * This field contains the ChaincodeID of executing this invocation. Endorser * will set it with the ChaincodeID called by endorser while simulating proposal. * Committer will validate the version matching with latest chaincode version. * Adding ChaincodeID to keep version opens up the possibility of multiple * ChaincodeAction per transaction. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 4;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec) obj; boolean result = true; result = result && type_ == other.type_; result = result && (hasChaincodeId() == other.hasChaincodeId()); if (hasChaincodeId()) { result = result && getChaincodeId() .equals(other.getChaincodeId()); } result = result && (hasInput() == other.hasInput()); if (hasInput()) { result = result && getInput() .equals(other.getInput()); } result = result && (getTimeout() == other.getTimeout()); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeAction)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeAction other = (org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeAction) obj; boolean result = true; result = result && getResults() .equals(other.getResults()); result = result && getEvents() .equals(other.getEvents()); result = result && (hasResponse() == other.hasResponse()); if (hasResponse()) { result = result && getResponse() .equals(other.getResponse()); } result = result && (hasChaincodeId() == other.hasChaincodeId()); if (hasChaincodeId()) { result = result && getChaincodeId() .equals(other.getChaincodeId()); } return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec other = (org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeSpec) obj; boolean result = true; result = result && type_ == other.type_; result = result && (hasChaincodeId() == other.hasChaincodeId()); if (hasChaincodeId()) { result = result && getChaincodeId() .equals(other.getChaincodeId()); } result = result && (hasInput() == other.hasInput()); if (hasInput()) { result = result && getInput() .equals(other.getInput()); } result = result && (getTimeout() == other.getTimeout()); return result; }
/** * <pre> * The ID of the chaincode to target. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
/** * <pre> * The ID of the chaincode to target. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
/** * <pre> * The ID of the chaincode to target. * </pre> * * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
/** * Start chaincode * * @param args command line arguments */ public void start(String[] args) { try { processEnvironmentOptions(); processCommandLineOptions(args); initializeLogging(); validateOptions(); final ChaincodeID chaincodeId = ChaincodeID.newBuilder().setName(this.id).build(); final ManagedChannelBuilder<?> channelBuilder = newChannelBuilder(); final Handler handler = new Handler(chaincodeId, this); new ChaincodeSupportStream(channelBuilder, handler::onChaincodeMessage, handler::nextOutboundChaincodeMessage); } catch (Exception e) { logger.fatal("Chaincode could not start", e); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension other = (org.hyperledger.fabric.protos.peer.ProposalPackage.ChaincodeHeaderExtension) obj; boolean result = true; result = result && getPayloadVisibility() .equals(other.getPayloadVisibility()); result = result && (hasChaincodeId() == other.hasChaincodeId()); if (hasChaincodeId()) { result = result && getChaincodeId() .equals(other.getChaincodeId()); } return result; }
/** * <code>optional .protos.ChaincodeID chaincode_id = 2;</code> */ public Builder mergeChaincodeId(org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID value) { if (chaincodeIdBuilder_ == null) { if (chaincodeId_ != null) { chaincodeId_ = org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeID.newBuilder(chaincodeId_).mergeFrom(value).buildPartial(); } else { chaincodeId_ = value; } onChanged(); } else { chaincodeIdBuilder_.mergeFrom(value); } return this; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension other = (org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension) obj; boolean result = true; result = result && getPayloadVisibility() .equals(other.getPayloadVisibility()); result = result && (hasChaincodeId() == other.hasChaincodeId()); if (hasChaincodeId()) { result = result && getChaincodeId() .equals(other.getChaincodeId()); } return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension other = (org.hyperledger.fabric.protos.peer.FabricProposal.ChaincodeHeaderExtension) obj; boolean result = true; result = result && getPayloadVisibility() .equals(other.getPayloadVisibility()); result = result && (hasChaincodeId() == other.hasChaincodeId()); if (hasChaincodeId()) { result = result && getChaincodeId() .equals(other.getChaincodeId()); } return result; }