Skip to content

Commit

Permalink
[FAB-9684] Replace runningChaincodes
Browse files Browse the repository at this point in the history
HandlerRegistry is used to track handlers based on the canonical name of
the chaincode. In addition to tracking handlers, it helps encapsulate
the launch and registration protocol.

Change-Id: I8013fca1dffa0d4a1cc28c6992fef5f51768a482
Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
  • Loading branch information
sykesm committed Apr 25, 2018
1 parent 1ba59e1 commit aa2cc94
Show file tree
Hide file tree
Showing 12 changed files with 508 additions and 427 deletions.
2 changes: 0 additions & 2 deletions core/chaincode/ccproviderimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ type ccProviderImpl struct {
cs *ChaincodeSupport
}

var _ ccprovider.ChaincodeProvider = &ccProviderImpl{}

// ccProviderContextImpl contains the state that is passed around to calls to methods of ccProviderImpl
type ccProviderContextImpl struct {
ctx *ccprovider.CCContext
Expand Down
10 changes: 10 additions & 0 deletions core/chaincode/chaincode_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,13 @@ type certGenerator interface {
type processor interface {
Processor
}

// Helpers to access unexported state.

func SetHandlerTxContexts(h *Handler, txContexts *TransactionContexts) {
h.txCtxs = txContexts
}

func InitializeQueryContext(h *Handler, txContext *TransactionContext, queryID string, resultsIterator commonledger.ResultsIterator) {
h.initializeQueryContext(txContext, queryID, resultsIterator)
}
Loading

0 comments on commit aa2cc94

Please sign in to comment.