// ExecTxs executes all the transactions listed in the txs array // one-by-one. If all the executions are successful, it returns // the candidate global state hash, and nil error array. func (h *Helper) ExecTxs(id interface{}, txs []*pb.Transaction) ([]byte, error) { // TODO id is currently ignored, fix once the underlying implementation accepts id // The secHelper is set during creat ChaincodeSupport, so we don't need this step // cxt := context.WithValue(context.Background(), "security", h.coordinator.GetSecHelper()) // TODO return directly once underlying implementation no longer returns []error res, _ := chaincode.ExecuteTransactions(context.Background(), chaincode.DefaultChain, txs) h.curBatch = append(h.curBatch, txs...) // TODO, remove after issue 579 return res, nil }
// ExecTXs executes all the transactions listed in the txs array // one-by-one. If all the executions are successful, it returns // the candidate global state hash, and nil error array. func (h *Helper) ExecTXs(txs []*pb.Transaction) ([]byte, []error) { // The secHelper is set during creat ChaincodeSupport, so we don't need this step // cxt := context.WithValue(context.Background(), "security", h.coordinator.GetSecHelper()) return chaincode.ExecuteTransactions(context.Background(), chaincode.DefaultChain, txs) }
// ExecTXs executes all the transactions listed in the txs array // one-by-one. If all the executions are successful, it returns // the candidate global state hash, and nil error array. func (h *Helper) ExecTXs(txs []*pb.Transaction) ([]byte, []error) { return chaincode.ExecuteTransactions(context.Background(), chaincode.DefaultChain, txs, h.coordinator.GetSecHelper()) }