blocksutil

package
v0.0.0-...-8b9b725 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: MIT, MIT Imports: 1 Imported by: 2

README

go-ipfs-blocksutil

standard-readme compliant GoDoc Build Status

go-ipfs-blocksutil provides provides utility functions for working with Blocks.

Table of Contents

Install

go-ipfs-blocksutil works like a regular Go module:

> go get github.com/ipfs/go-ipfs-blocksutil

Usage

import "github.com/ipfs/go-ipfs-blocksutil"

Check the GoDoc documentation

Contribute

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © Protocol Labs, Inc.

Documentation

Overview

Package blocksutil provides utility functions for working with Blocks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockGenerator

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

BlockGenerator generates BasicBlocks on demand. For each instace of BlockGenerator, each new block is different from the previous, although two different instances will produce the same.

func NewBlockGenerator

func NewBlockGenerator() BlockGenerator

NewBlockGenerator returns an object capable of producing blocks.

func (*BlockGenerator) Blocks

func (bg *BlockGenerator) Blocks(n int) []blocks.Block

Blocks generates as many BasicBlocks as specified by n.

func (*BlockGenerator) Next

func (bg *BlockGenerator) Next() *blocks.BasicBlock

Next generates a new BasicBlock.

Jump to

Keyboard shortcuts

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