Documentation ¶
Index ¶
Constants ¶
const ( SourceTypeUndef = SourceType(iota) SourceTypeSequencer SourceTypePeer SourceTypeAPI SourceTypeTxStore SourceTypePulled )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PortionInfo ¶
TransactionMetadata optional data which may be attached to the transaction Wrong metadata or absence of it entirely or in parts cannot damage the network When present, metadata is used for consistency checking and workflow optimization
type SourceType ¶
type SourceType byte
TransactionMetadata optional data which may be attached to the transaction Wrong metadata or absence of it entirely or in parts cannot damage the network When present, metadata is used for consistency checking and workflow optimization
func (SourceType) String ¶
func (s SourceType) String() string
type TransactionMetadata ¶
type TransactionMetadata struct { // persistent StateRoot common.VCommitment // not nil may be for branch transactions LedgerCoverage *uint64 // not nil may be for sequencer transactions SlotInflation *uint64 // not nil may be for sequencer transactions Supply *uint64 // not nil may be for branch transactions // non-persistent SourceTypeNonPersistent SourceType // non-persistent, used for internal workflow TxBytesReceived *time.Time // not-persistent, used for metrics }
TransactionMetadata optional data which may be attached to the transaction Wrong metadata or absence of it entirely or in parts cannot damage the network When present, metadata is used for consistency checking and workflow optimization
func ParseTxMetadata ¶
func ParseTxMetadata(txBytesWithMetadata []byte) (txBytes []byte, metadata *TransactionMetadata, err error)
func TransactionMetadataFromBytes ¶
func TransactionMetadataFromBytes(data []byte) (*TransactionMetadata, error)
func (*TransactionMetadata) Bytes ¶
func (m *TransactionMetadata) Bytes() []byte
Bytes of TransactionMetadata is nil-safe
func (*TransactionMetadata) JSONAble ¶
func (m *TransactionMetadata) JSONAble() *TransactionMetadataJSONAble
func (*TransactionMetadata) String ¶
func (m *TransactionMetadata) String() string
String returns info of the persistent part
type TransactionMetadataJSONAble ¶
type TransactionMetadataJSONAble struct { // persistent StateRoot string `json:"state_root,omitempty"` LedgerCoverage uint64 `json:"ledger_coverage,omitempty"` SlotInflation uint64 `json:"slot_inflation,omitempty"` Supply uint64 `json:"supply,omitempty"` }
TransactionMetadata optional data which may be attached to the transaction Wrong metadata or absence of it entirely or in parts cannot damage the network When present, metadata is used for consistency checking and workflow optimization