endorsement

package
v0.0.0-...-4273fad Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Copyright 2018-2019 The trust-net Authors Endorsement Layer interface and implementation for DLT Statck

Index

Constants

View Source
const (
	SUCCESS int = iota
	ERR_DUPLICATE
	ERR_DOUBLE_SPEND
	ERR_ORPHAN
	ERR_INVALID
)

Variables

This section is empty.

Functions

func GenesisSubmitterTx

func GenesisSubmitterTx(submitterId []byte) dto.Transaction

func NewEndorser

func NewEndorser(db repo.DltDb) (*endorser, error)

Types

type Endorser

type Endorser interface {
	// validate submitter's transaction request details
	Validate(req *dto.TxRequest) error
	// Handle network transaction
	Handle(tx dto.Transaction) (int, error)
	// Replace submitter history
	Replace(tx dto.Transaction) error
	// Approve submitted transaction
	Approve(tx dto.Transaction) error
	// Update submitter history for transaction
	Update(tx dto.Transaction) error
	// Provide all known shard/tx pairs for a submitter/seq
	KnownShardsTxs(submitter []byte, seq uint64) (shards [][]byte, txs [][64]byte)
}

Jump to

Keyboard shortcuts

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