Skip to content

Commit

Permalink
FAB-4501-Bad null check channelConfiguration
Browse files Browse the repository at this point in the history
Change-Id: Ie61bfa9c106a4767449c849ad901beea2276574d
Signed-off-by: rickr <cr22rc@gmail.com>
  • Loading branch information
cr22rc committed Jun 9, 2017
1 parent c2602e8 commit 90f4603
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/org/hyperledger/fabric/sdk/Channel.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ public Collection<EventHub> getEventHubs() {
private Block genesisBlock;
private final boolean systemChannel;

ExecutorService getChannelExecutorService() {
return executorService;
}

private Channel(String name, HFClient hfClient, Orderer orderer, ChannelConfiguration channelConfiguration, byte[][] signers) throws InvalidArgumentException, TransactionException {
this(name, hfClient, false);
Expand Down Expand Up @@ -686,7 +683,6 @@ private Block getGenesisBlock(Orderer order) throws TransactionException {

byte[] deliverPayloadBytes = deliverPayload.toByteArray();


Envelope deliverEnvelope = Envelope.newBuilder()
.setSignature(ByteString.copyFrom(cryptoSuite.sign(getEnrollment().getKey(), deliverPayloadBytes)))
.setPayload(ByteString.copyFrom(deliverPayloadBytes))
Expand Down Expand Up @@ -2152,7 +2148,7 @@ private Pair(Peer peer, Future<FabricProposalResponse.ProposalResponse> future)
* Send transaction to one of the orderers on the channel using a specific user context.
*
* @param proposalResponses The proposal responses to be sent to the orderer.
* @param userContext The usercontext used for signing transaction.
* @param userContext The usercontext used for signing transaction.
* @return a future allowing access to the result of the transaction invocation once complete.
*/
public CompletableFuture<TransactionEvent> sendTransaction(Collection<ProposalResponse> proposalResponses, User userContext) {
Expand Down Expand Up @@ -2318,7 +2314,7 @@ byte[] getChannelConfigurationSignature(ChannelConfiguration channelConfiguratio

}

if (signer == channelConfiguration) {
if (null == channelConfiguration) {

throw new InvalidArgumentException("channelConfiguration is null");

Expand Down

0 comments on commit 90f4603

Please sign in to comment.