commitments

package
v0.0.0-...-02c3ccb Latest Latest
Warning

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

Go to latest
Published: May 22, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commitments

type Commitments struct {
	// contains filtered or unexported fields
}

Commitments stores cryptographic commitments.

func New

func New(db *sql.DB, mapID int64) (*Commitments, error)

New returns a new SQL backed commitment db.

func (*Commitments) Read

func (c *Commitments) Read(ctx context.Context, commitment []byte) (*tpb.Committed, error)

Read retrieves a commitment from the database.

func (*Commitments) Write

func (c *Commitments) Write(ctx context.Context, commitment []byte, committed *tpb.Committed) (returnErr error)

WriteCommitment saves a commitment to the database. Writes if the same commitment value succeeds.

Jump to

Keyboard shortcuts

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