burrow: github.com/hyperledger/burrow/execution/proposal Index | Files

package proposal

import "github.com/hyperledger/burrow/execution/proposal"


Package Files

cache.go proposal.go

type Cache Uses

type Cache struct {
    // contains filtered or unexported fields

Cache helps prevent unnecessary IAVLTree updates and garbage generation.

func NewCache Uses

func NewCache(backend Reader) *Cache

Returns a Cache, can write to an output Writer via Sync. Not goroutine safe, use syncStateCache if you need concurrent access

func (*Cache) Backend Uses

func (cache *Cache) Backend() Reader

func (*Cache) GetProposal Uses

func (cache *Cache) GetProposal(proposalHash []byte) (*payload.Ballot, error)

func (*Cache) RemoveProposal Uses

func (cache *Cache) RemoveProposal(proposalHash []byte) error

func (*Cache) Reset Uses

func (cache *Cache) Reset(backend Reader)

Resets the cache to empty initialising the backing map to the same size as the previous iteration

func (*Cache) Sync Uses

func (cache *Cache) Sync(state Writer) error

Writes whatever is in the cache to the output Writer state. Does not flush the cache, to do that call Reset() after Sync or use Flush if your wish to use the output state as your next backend

func (*Cache) UpdateProposal Uses

func (cache *Cache) UpdateProposal(proposalHash []byte, ballot *payload.Ballot) error

type Iterable Uses

type Iterable interface {
    IterateProposals(consumer func(proposalHash []byte, proposal *payload.Ballot) error) (err error)

type IterableReader Uses

type IterableReader interface {

type IterableReaderWriter Uses

type IterableReaderWriter interface {

type ProposalHash Uses

type ProposalHash [sha256.Size]byte

type ProposalHashArray Uses

type ProposalHashArray []ProposalHash

func (ProposalHashArray) Len Uses

func (p ProposalHashArray) Len() int

func (ProposalHashArray) Less Uses

func (p ProposalHashArray) Less(i, j int) bool

func (ProposalHashArray) Swap Uses

func (p ProposalHashArray) Swap(i, j int)

type Reader Uses

type Reader interface {
    GetProposal(proposalHash []byte) (*payload.Ballot, error)

type ReaderWriter Uses

type ReaderWriter interface {

type Writer Uses

type Writer interface {
    // Updates the proposal, creating it if it does not exist
    UpdateProposal(proposalHash []byte, proposal *payload.Ballot) error
    // Remove the proposal by hash
    RemoveProposal(proposalHash []byte) error

Package proposal imports 6 packages (graph) and is imported by 16 packages. Updated 2020-04-25. Refresh now. Tools for package owners.