Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockVerifier ¶
type BlockVerifier interface { //BlockCheck check block valid BlockCheck(block types.Block) (ProcessResult, error) //Process check block and process block to badger Process(block types.Block) (ProcessResult, error) }
type LedgerVerifier ¶
type LedgerVerifier struct {
// contains filtered or unexported fields
}
func NewLedgerVerifier ¶
func NewLedgerVerifier(l *ledger.Ledger) *LedgerVerifier
func (*LedgerVerifier) BlockCheck ¶
func (lv *LedgerVerifier) BlockCheck(block types.Block) (ProcessResult, error)
func (*LedgerVerifier) BlockProcess ¶
func (lv *LedgerVerifier) BlockProcess(block types.Block) error
func (*LedgerVerifier) Process ¶
func (lv *LedgerVerifier) Process(block types.Block) (ProcessResult, error)
type ProcessResult ¶
type ProcessResult byte
const ( Progress ProcessResult = iota BadWork BadSignature Old Fork GapPrevious GapSource GapSmartContract BalanceMismatch UnReceivable InvalidData Other )
func (ProcessResult) String ¶
func (r ProcessResult) String() string
Click to show internal directories.
Click to hide internal directories.