File tree 4 files changed +16
-0
lines changed
4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -93,3 +93,9 @@ func (ap *ApplicationProvider) V1_2Validation() bool {
93
93
func (ap * ApplicationProvider ) MetadataLifecycle () bool {
94
94
return ap .v12LifecycleExperimental
95
95
}
96
+
97
+ // KeyLevelEndorsement returns true if this channel supports endorsement
98
+ // policies expressible at a ledger key granularity, as described in FAB-8812
99
+ func (ap * ApplicationProvider ) KeyLevelEndorsement () bool {
100
+ return ap .v12
101
+ }
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ func TestApplicationV12(t *testing.T) {
36
36
assert .True (t , op .ForbidDuplicateTXIdInBlock ())
37
37
assert .True (t , op .V1_1Validation ())
38
38
assert .True (t , op .V1_2Validation ())
39
+ assert .True (t , op .KeyLevelEndorsement ())
39
40
}
40
41
41
42
func TestApplicationPvtDataExperimental (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -141,6 +141,10 @@ type ApplicationCapabilities interface {
141
141
// v1.0/v1.1 lifecycle, or whether it should use the newer per channel peer local chaincode
142
142
// metadata package approach planned for release with Fabric v1.2
143
143
MetadataLifecycle () bool
144
+
145
+ // KeyLevelEndorsement returns true if this channel supports endorsement
146
+ // policies expressible at a ledger key granularity, as described in FAB-8812
147
+ KeyLevelEndorsement () bool
144
148
}
145
149
146
150
// OrdererCapabilities defines the capabilities for the orderer portion of a channel
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ type MockApplicationCapabilities struct {
43
43
V1_1ValidationRv bool
44
44
V1_2ValidationRv bool
45
45
MetadataLifecycleRv bool
46
+ KeyLevelEndorsementRv bool
46
47
}
47
48
48
49
func (mac * MockApplicationCapabilities ) Supported () error {
@@ -72,3 +73,7 @@ func (mac *MockApplicationCapabilities) V1_2Validation() bool {
72
73
func (mac * MockApplicationCapabilities ) MetadataLifecycle () bool {
73
74
return mac .MetadataLifecycleRv
74
75
}
76
+
77
+ func (mac * MockApplicationCapabilities ) KeyLevelEndorsement () bool {
78
+ return mac .KeyLevelEndorsementRv
79
+ }
You can’t perform that action at this time.
0 commit comments