Version: v2.0.1+incompatible Latest Latest

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 5 Imported by: 0




This section is empty.


View Source
var (
	// ChannelAllowedChars tracks the permitted characters for a channel name
	ChannelAllowedChars = "[a-z][a-z0-9.-]*"
	// MaxLength tracks the maximum length of a channel name
	MaxLength = 249


func ValidateChannelID

func ValidateChannelID(channelID string) error

ValidateChannelID makes sure that proposed channel IDs comply with the following restrictions:

1. Contain only lower case ASCII alphanumerics, dots '.', and dashes '-'
2. Are shorter than 250 characters.
3. Start with a letter

This is the intersection of the Kafka restrictions and CouchDB restrictions with the following exception: '.' is converted to '_' in the CouchDB naming This is to accommodate existing channel names with '.', especially in the behave tests which rely on the dot notation for their sluggification.

note: this function is a copy of the same in common/configtx/validator.go


type EndorserTx

type EndorserTx struct {
	ComputedTxID string
	ChannelID    string
	ChaincodeID  *peer.ChaincodeID
	Creator      []byte
	Response     *peer.Response
	Events       []byte
	Results      []byte
	Endorsements []*peer.Endorsement
	Type         int32
	Version      int32
	Epoch        uint64
	Nonce        []byte

EndorserTx represents a parsed common.Envelope protobuf

func UnmarshalEndorserTxAndValidate

func UnmarshalEndorserTxAndValidate(txenv *tx.Envelope) (*EndorserTx, error)

UnmarshalEndorserTxAndValidate receives a tx.Envelope containing a partially unmarshalled endorser transaction and returns an EndorserTx instance (or an error)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL