@@ -995,16 +995,16 @@ private Block getConfigurationBlock() throws TransactionException {
995
995
Payload payload = Payload .parseFrom (envelopeRet .getPayload ());
996
996
ChannelHeader channelHeader = ChannelHeader .parseFrom (payload .getHeader ().getChannelHeader ());
997
997
if (channelHeader .getType () != HeaderType .CONFIG .getNumber ()) {
998
- throw new TransactionException (format ("Bad last configuation block type %d, expected %d" ,
998
+ throw new TransactionException (format ("Bad last configuration block type %d, expected %d" ,
999
999
channelHeader .getType (), HeaderType .CONFIG .getNumber ()));
1000
1000
}
1001
1001
1002
1002
if (!name .equals (channelHeader .getChannelId ())) {
1003
- throw new TransactionException (format ("Bad last configuation block channel id %s, expected %s" ,
1003
+ throw new TransactionException (format ("Bad last configuration block channel id %s, expected %s" ,
1004
1004
channelHeader .getChannelId (), name ));
1005
1005
}
1006
1006
1007
- logger .trace (format ("Channel %s getConfigurationBlock retraceturned %s" , name , "" + configBlock ));
1007
+ logger .trace (format ("Channel %s getConfigurationBlock returned %s" , name , "" + configBlock ));
1008
1008
if (!logger .isTraceEnabled ()) {
1009
1009
logger .debug (format ("Channel %s getConfigurationBlock returned" , name ));
1010
1010
}
@@ -1246,9 +1246,9 @@ public Collection<ProposalResponse> sendInstantiationProposal(InstantiateProposa
1246
1246
*
1247
1247
* @param instantiateProposalRequest
1248
1248
* @param peers
1249
+ * @return
1249
1250
* @throws IllegalArgumentException
1250
1251
* @throws ProposalException
1251
- * @return
1252
1252
*/
1253
1253
1254
1254
public Collection <ProposalResponse > sendInstantiationProposal (InstantiateProposalRequest instantiateProposalRequest , Collection <Peer > peers ) throws InvalidArgumentException , ProposalException {
@@ -1502,7 +1502,7 @@ public BlockInfo queryBlockByHash(Peer peer, byte[] blockHash) throws InvalidArg
1502
1502
}
1503
1503
responseBlock = new BlockInfo (Block .parseFrom (proposalResponse .getProposalResponse ().getResponse ().getPayload ()));
1504
1504
} catch (Exception e ) {
1505
- String emsg = format ("queryBlockByHash hash: %s %npeer %s channel %s %nerror : %s" ,
1505
+ String emsg = format ("queryBlockByHash hash: %s peer %s channel %s error : %s" ,
1506
1506
Hex .encodeHexString (blockHash ), peer .getName (), name , e .getMessage ());
1507
1507
logger .error (emsg , e );
1508
1508
throw new ProposalException (emsg , e );
@@ -2057,7 +2057,6 @@ public Collection<ProposalResponse> queryByChaincode(QueryByChaincodeRequest que
2057
2057
* @return
2058
2058
* @throws InvalidArgumentException
2059
2059
* @throws ProposalException
2060
- *
2061
2060
*/
2062
2061
2063
2062
public Collection <ProposalResponse > queryByChaincode (QueryByChaincodeRequest queryByChaincodeRequest , Collection <Peer > peers ) throws InvalidArgumentException , ProposalException {
@@ -2229,6 +2228,15 @@ public CompletableFuture<TransactionEvent> sendTransaction(Collection<ProposalRe
2229
2228
throw new TransactionException ("sendTransaction on channel not initialized." );
2230
2229
}
2231
2230
2231
+ if (config .getProposalConsistencyValidation ()) {
2232
+
2233
+ if (1 != SDKUtils .getProposalConsistencySets (proposalResponses ).size ()) {
2234
+ throw new IllegalArgumentException ("The proposal responses do not have consistent read write sets" );
2235
+
2236
+ }
2237
+
2238
+ }
2239
+
2232
2240
List <FabricProposalResponse .Endorsement > ed = new LinkedList <>();
2233
2241
FabricProposal .Proposal proposal = null ;
2234
2242
ByteString proposalResponsePayload = null ;
@@ -2275,8 +2283,6 @@ public CompletableFuture<TransactionEvent> sendTransaction(Collection<ProposalRe
2275
2283
2276
2284
}
2277
2285
2278
- //TransactionResponse tresp = new TransactionResponse(transactionContext.getTxID(), transactionContext.getChannelID(), resp.getStatusValue(), resp.getStatus().name());
2279
-
2280
2286
}
2281
2287
2282
2288
if (success ) {
0 commit comments