Skip to content

Commit c78e90d

Browse files
committed
[FAB-10169] add support to retrieve metadata
Validation plugins need support to retrieve ledger metadata so that they can handle state-based endorsements. This change set extends the state dependency with the relevant functions. Change-Id: I0a6f4ee2bce261a131c316b4410c2bc813c3c98e Signed-off-by: Alessandro Sorniotti <ale.linux@sopit.net>
1 parent 68b7e7a commit c78e90d

File tree

1 file changed

+6
-0
lines changed
  • core/handlers/validation/api/state

1 file changed

+6
-0
lines changed

core/handlers/validation/api/state/state.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ type State interface {
2222
// The returned ResultsIterator contains results of type *KV which is defined in protos/ledger/queryresult.
2323
GetStateRangeScanIterator(namespace string, startKey string, endKey string) (ResultsIterator, error)
2424

25+
// GetStateMetadata returns the metadata for given namespace and key
26+
GetStateMetadata(namespace, key string) (map[string][]byte, error)
27+
28+
// GetPrivateDataMetadata gets the metadata of a private data item identified by a tuple <namespace, collection, key>
29+
GetPrivateDataMetadata(namespace, collection, key string) (map[string][]byte, error)
30+
2531
// Done releases resources occupied by the State
2632
Done()
2733
}

0 commit comments

Comments
 (0)