txn

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider is a transaction service provider

func NewProvider

func NewProvider(configProvider configServiceProvider, peerConfig api.PeerConfig, validatorRegistry configValidatorRegistry, gossipProvider gossipProvider, validatorProvider proposalResponseValidatorProvider) *Provider

NewProvider returns a new transaction service provider

func (*Provider) Close

func (p *Provider) Close()

Close closes all of the channel services

func (*Provider) ForChannel

func (p *Provider) ForChannel(channelID string) (api.Service, error)

ForChannel returns the transaction service for the given channel

type Service

type Service struct {
	*discovery.Discovery
	// contains filtered or unexported fields
}

Service implements a Transaction service that gathers multiple endorsements (according to chaincode policy) and (optionally) sends the transaction to the Orderer.

func (*Service) Close

func (s *Service) Close()

Close releases the resources for this service

func (*Service) CommitEndorsements added in v0.1.4

func (s *Service) CommitEndorsements(req *api.CommitRequest) (*channel.Response, bool, error)

CommitEndorsements commits the provided endorsements.

func (*Service) Endorse

func (s *Service) Endorse(req *api.Request) (*channel.Response, error)

Endorse collects endorsements according to chaincode policy

func (*Service) EndorseAndCommit

func (s *Service) EndorseAndCommit(req *api.Request) (*channel.Response, bool, error)

EndorseAndCommit collects endorsements (according to chaincode policy) and sends the endorsements to the Orderer

func (*Service) GetPeer added in v0.1.4

func (s *Service) GetPeer(endpoint string) (fab.Peer, error)

GetPeer returns the peer for the given endpoint

func (*Service) SigningIdentity added in v0.1.4

func (s *Service) SigningIdentity() ([]byte, error)

SigningIdentity returns the serialized identity of the proposal signer

func (*Service) ValidateProposalResponses added in v0.1.4

func (s *Service) ValidateProposalResponses(signedProposal *pb.SignedProposal, proposalResponses []*pb.ProposalResponse) (pb.TxValidationCode, error)

ValidateProposalResponses validates the given proposal responses

func (*Service) VerifyProposalSignature added in v0.1.4

func (s *Service) VerifyProposalSignature(signedProposal *pb.SignedProposal) error

VerifyProposalSignature verifies that the signed proposal is valid

Directories

Path Synopsis
mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL