ledger

package
v0.0.0-...-798156f Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package ledger provides useful utilities concerning ledgers within digitalbits, specifically as a central location to store a cached snapshot of the state of both frontier's and digitalbits-core's views of the ledger. This package is intended to be at the lowest levels of frontier's dependency tree, please keep it free of dependencies to other frontier packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetState

func SetState(next State)

SetState updates the cached snapshot of the ledger state

Types

type State

type State struct {
	CoreLatest    int32 `db:"core_latest"`
	HistoryLatest int32 `db:"history_latest"`
	HistoryElder  int32 `db:"history_elder"`
}

State represents a snapshot of both frontier's and digitalbits-core's view of the ledger.

func CurrentState

func CurrentState() State

CurrentState returns the cached snapshot of ledger state

Jump to

Keyboard shortcuts

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