Skip to content

Commit

Permalink
Remove lscc reference in endorser pkg
Browse files Browse the repository at this point in the history
This CR makes changes in endorser pkg to use proper
dependency instead of relying on fetching the data
directly from state

FAB-13608 #done

Change-Id: Ib55fa2790d8e29cb4a239bec93cb8a0604623612
Signed-off-by: manish <manish.sethi@gmail.com>
  • Loading branch information
manish-sethi committed Jan 10, 2019
1 parent 6e4c417 commit e06b25f
Show file tree
Hide file tree
Showing 11 changed files with 1,114 additions and 823 deletions.
5 changes: 4 additions & 1 deletion core/endorser/endorser.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ type Support interface {

// GetLedgerHeight returns ledger height for given channelID
GetLedgerHeight(channelID string) (uint64, error)

// GetDeployedCCInfoProvider returns ledger.DeployedChaincodeInfoProvider
GetDeployedCCInfoProvider() ledger.DeployedChaincodeInfoProvider
}

// Endorser provides the Endorser service ProcessProposal
Expand Down Expand Up @@ -252,7 +255,7 @@ func (e *Endorser) SimulateProposal(txParams *ccprovider.TransactionParams, cid
txParams.TXSimulator.Done()
return nil, nil, nil, nil, errors.New("Private data is forbidden to be used in instantiate")
}
pvtDataWithConfig, err := e.AssemblePvtRWSet(simResult.PvtSimulationResults, txParams.TXSimulator)
pvtDataWithConfig, err := e.AssemblePvtRWSet(simResult.PvtSimulationResults, txParams.TXSimulator, e.s.GetDeployedCCInfoProvider())
// To read collection config need to read collection updates before
// releasing the lock, hence txParams.TXSimulator.Done() moved down here
txParams.TXSimulator.Done()
Expand Down
3 changes: 2 additions & 1 deletion core/endorser/mocks/channel_state_retriever.go

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

3 changes: 2 additions & 1 deletion core/endorser/mocks/plugin_mapper.go

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

3 changes: 2 additions & 1 deletion core/endorser/mocks/query_creator.go

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

3 changes: 2 additions & 1 deletion core/endorser/mocks/store.go

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

Loading

0 comments on commit e06b25f

Please sign in to comment.