bmtpool

package
v2.8.3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: BSD-3-Clause Imports: 3 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package bmtpool provides easy access to binary merkle tree hashers managed in as a resource pool.

Index

Constants

View Source
const Capacity = 32

Variables

This section is empty.

Functions

func Get

func Get() bmt.Hasher

Get a bmt Hasher instance. Instances are reset before being returned to the caller.

func GetProver added in v2.8.1

func GetProver() *bmt.Prover

GetProver returns a goroutine-backed Prover from the global prover pool.

func Put

func Put(h bmt.Hasher)

Put a bmt Hasher back into the pool.

func PutProver added in v2.8.1

func PutProver(p *bmt.Prover)

PutProver returns a Prover to the global prover pool for reuse.

func Rebuild added in v2.8.1

func Rebuild()

Rebuild discards the current pool and constructs a new one reading the latest bmt.SIMDOptIn() value. Must be called exactly once during startup after CLI flag parsing and before the first external Get, so that --use-simd-hashing takes effect and no in-flight hashers are referencing the old pool's tree. The Prover pool is intentionally not rebuilt.

Types

This section is empty.

Jump to

Keyboard shortcuts

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