Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Commit 494eabe

Browse files
FABJ-469: Remove getChaincodeIDPath from BlockInfo
This value is never populated in events received from peers in Fabric 2.0. Removing to avoid confusion about why it is always empty. Change-Id: I4f6920495888f79035ecfd1ba53b143f78018766 Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
1 parent 10d2358 commit 494eabe

File tree

3 files changed

+4
-24
lines changed

3 files changed

+4
-24
lines changed

src/main/java/org/hyperledger/fabric/sdk/BlockInfo.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -536,22 +536,6 @@ public String getChaincodeIDName() {
536536
return ccid != null ? ccid.getName() : null;
537537
}
538538

539-
/**
540-
* get path of chaincode with this transaction action
541-
*
542-
* @return path of chaincode. Maybe null if no chaincode or if block is filtered.
543-
*/
544-
public String getChaincodeIDPath() {
545-
if (isFiltered()) {
546-
return null;
547-
}
548-
549-
Chaincode.ChaincodeID ccid = transactionAction.getPayload().getAction().getProposalResponsePayload().
550-
getExtension().getChaincodeID();
551-
552-
return ccid != null ? ccid.getPath() : null;
553-
}
554-
555539
/**
556540
* get version of chaincode with this transaction action
557541
*

src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -973,9 +973,8 @@ void blockWalker(HFClient client, Channel channel) throws InvalidArgumentExcepti
973973

974974
String chaincodeIDName = transactionActionInfo.getChaincodeIDName();
975975
String chaincodeIDVersion = transactionActionInfo.getChaincodeIDVersion();
976-
String chaincodeIDPath = transactionActionInfo.getChaincodeIDPath();
977-
out(" Transaction action %d proposal chaincodeIDName: %s, chaincodeIDVersion: %s, chaincodeIDPath: %s ", j,
978-
chaincodeIDName, chaincodeIDVersion, chaincodeIDPath);
976+
out(" Transaction action %d proposal chaincodeIDName: %s, chaincodeIDVersion: %s", j,
977+
chaincodeIDName, chaincodeIDVersion);
979978

980979
// Check to see if we have our expected event.
981980
if (blockNumber == 2) {
@@ -987,7 +986,6 @@ void blockWalker(HFClient client, Channel channel) throws InvalidArgumentExcepti
987986
assertEquals(CHAIN_CODE_NAME, chaincodeEvent.getChaincodeId());
988987
assertEquals(EXPECTED_EVENT_NAME, chaincodeEvent.getEventName());
989988
assertEquals(CHAIN_CODE_NAME, chaincodeIDName);
990-
assertEquals(CHAIN_CODE_PATH, chaincodeIDPath);
991989
assertEquals("1", chaincodeIDVersion);
992990
}
993991

src/test/java/org/hyperledger/fabric/sdkintegration/End2endMTIT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -932,9 +932,8 @@ void blockWalker(HFClient client, Channel channel) throws InvalidArgumentExcepti
932932

933933
String chaincodeIDName = transactionActionInfo.getChaincodeIDName();
934934
String chaincodeIDVersion = transactionActionInfo.getChaincodeIDVersion();
935-
String chaincodeIDPath = transactionActionInfo.getChaincodeIDPath();
936-
out(" Transaction action %d proposal chaincodeIDName: %s, chaincodeIDVersion: %s, chaincodeIDPath: %s ", j,
937-
chaincodeIDName, chaincodeIDVersion, chaincodeIDPath);
935+
out(" Transaction action %d proposal chaincodeIDName: %s, chaincodeIDVersion: %s", j,
936+
chaincodeIDName, chaincodeIDVersion);
938937

939938
// Check to see if we have our expected event.
940939
if (blockNumber == 2) {
@@ -946,7 +945,6 @@ void blockWalker(HFClient client, Channel channel) throws InvalidArgumentExcepti
946945
assertEquals(CHAIN_CODE_NAME, chaincodeEvent.getChaincodeId());
947946
assertEquals(EXPECTED_EVENT_NAME, chaincodeEvent.getEventName());
948947
assertEquals(CHAIN_CODE_NAME, chaincodeIDName);
949-
assertEquals("github.com/example_cc", chaincodeIDPath);
950948
assertEquals("1", chaincodeIDVersion);
951949

952950
}

0 commit comments

Comments
 (0)