Skip to content

Commit

Permalink
Merge "[FAB-10035] Fix function signature in ledger interface"
Browse files Browse the repository at this point in the history
  • Loading branch information
yacovm authored and Gerrit Code Review committed May 14, 2018
2 parents 6be509a + 82dc419 commit 1d4ffbe
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 27 deletions.
32 changes: 16 additions & 16 deletions core/chaincode/mock/tx_simulator.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (s *lockBasedTxSimulator) SetStateMultipleKeys(namespace string, kvs map[st
}

// SetStateMetadata implements method in interface `ledger.TxSimulator`
func (s *lockBasedTxSimulator) SetStateMetadata(namespace, key, metadata map[string][]byte) error {
func (s *lockBasedTxSimulator) SetStateMetadata(namespace, key string, metadata map[string][]byte) error {
return errors.New("not implemented")
}

Expand Down Expand Up @@ -121,12 +121,7 @@ func (s *lockBasedTxSimulator) GetPrivateDataRangeScanIterator(namespace, collec
}

// SetPrivateDataMetadata implements method in interface `ledger.TxSimulator`
func (s *lockBasedTxSimulator) SetPrivateDataMetadata(namespace, collection, key, metadata map[string][]byte) error {
return errors.New("not implemented")
}

// DeletePrivateMetadataEntry implements method in interface `ledger.TxSimulator`
func (s *lockBasedTxSimulator) DeletePrivateMetadataEntry(namespace, collection, key, metakey string) error {
func (s *lockBasedTxSimulator) SetPrivateDataMetadata(namespace, collection, key string, metadata map[string][]byte) error {
return errors.New("not implemented")
}

Expand Down
4 changes: 2 additions & 2 deletions core/ledger/ledger_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ type TxSimulator interface {
// SetMultipleKeys sets the values for multiple keys in a single call
SetStateMultipleKeys(namespace string, kvs map[string][]byte) error
// SetStateMetadata sets the metadata associated with an existing key-tuple <namespace, key>
SetStateMetadata(namespace, key, metadata map[string][]byte) error
SetStateMetadata(namespace, key string, metadata map[string][]byte) error
// DeleteStateMetadata deletes the metadata (if any) associated with an existing key-tuple <namespace, key>
DeleteStateMetadata(namespace, key string) error
// ExecuteUpdate for supporting rich data model (see comments on QueryExecutor above)
Expand All @@ -157,7 +157,7 @@ type TxSimulator interface {
// DeletePrivateData deletes the given tuple <namespace, collection, key> from private data
DeletePrivateData(namespace, collection, key string) error
// SetPrivateDataMetadata sets the metadata associated with an existing key-tuple <namespace, collection, key>
SetPrivateDataMetadata(namespace, collection, key, metadata map[string][]byte) error
SetPrivateDataMetadata(namespace, collection, key string, metadata map[string][]byte) error
// DeletePrivateDataMetadata deletes the metadata associated with an existing key-tuple <namespace, collection, key>
DeletePrivateDataMetadata(namespace, collection, key string) error
// GetTxSimulationResults encapsulates the results of the transaction simulation.
Expand Down
4 changes: 2 additions & 2 deletions core/mocks/ccprovider/ccprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ func (m *MockTxSim) GetPrivateDataMetadata(namespace, collection, key string) (m
return nil, nil
}

func (m *MockTxSim) SetStateMetadata(namespace, key, metadata map[string][]byte) error {
func (m *MockTxSim) SetStateMetadata(namespace, key string, metadata map[string][]byte) error {
return nil
}

func (m *MockTxSim) DeleteStateMetadata(namespace, key string) error {
return nil
}

func (m *MockTxSim) SetPrivateDataMetadata(namespace, collection, key, metadata map[string][]byte) error {
func (m *MockTxSim) SetPrivateDataMetadata(namespace, collection, key string, metadata map[string][]byte) error {
return nil
}

Expand Down

0 comments on commit 1d4ffbe

Please sign in to comment.