txsnapservice

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DoIntializeChannel = true

DoIntializeChannel use for testing

View Source
var PeerConfigPath = ""

PeerConfigPath use for testing

Functions

This section is empty.

Types

type EndorsedCallback added in v0.1.5

type EndorsedCallback func([]*apitxn.TransactionProposalResponse) error

EndorsedCallback is a function that is invoked after the endorsement phase of EndorseAndCommitTransaction. (Used in unit tests.)

type TxServiceImpl

type TxServiceImpl struct {
	Config     api.Config
	FcClient   api.Client
	Membership api.MembershipManager

	// Callback is invoked after the endorsement
	// phase of EndorseAndCommitTransaction
	// (Used in unit tests.)
	Callback EndorsedCallback
}

TxServiceImpl used to create transaction service

func Get

func Get(channelID string) (*TxServiceImpl, error)

Get will return txService to caller

func (*TxServiceImpl) ClientConfig

func (txs *TxServiceImpl) ClientConfig() sdkConfigApi.Config

ClientConfig to return client config

func (*TxServiceImpl) CommitTransaction

func (txs *TxServiceImpl) CommitTransaction(channelID string, tpResponses []*apitxn.TransactionProposalResponse, registerTxEvent bool) (pb.TxValidationCode, error)

CommitTransaction use to comit the transaction

func (*TxServiceImpl) EndorseAndCommitTransaction

func (txs *TxServiceImpl) EndorseAndCommitTransaction(snapTxRequest *api.SnapTransactionRequest, peers []sdkApi.Peer) (pb.TxValidationCode, error)

EndorseAndCommitTransaction use to endorse and commit transaction

func (*TxServiceImpl) EndorseTransaction

func (txs *TxServiceImpl) EndorseTransaction(snapTxRequest *api.SnapTransactionRequest, peers []sdkApi.Peer) ([]*apitxn.TransactionProposalResponse, error)

EndorseTransaction use to endorse the transaction

func (*TxServiceImpl) GetPeersOfChannel

func (txs *TxServiceImpl) GetPeersOfChannel(args []string, membership api.MembershipManager) ([]byte, error)

GetPeersOfChannel use to get peers of channel

func (*TxServiceImpl) QueryChannels

func (txs *TxServiceImpl) QueryChannels(targetPeer sdkApi.Peer) ([]string, error)

QueryChannels to query channels based on peer

func (*TxServiceImpl) VerifyTxnProposalSignature

func (txs *TxServiceImpl) VerifyTxnProposalSignature(channelID string, signedProposal *pb.SignedProposal) error

VerifyTxnProposalSignature use to verify transaction proposal signature

Jump to

Keyboard shortcuts

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