d06c0bb181
This modifies the blockNode and BestState structs in the blockchain package to store hashes directly instead of pointers to them and updates callers to deal with the API change in the exported BestState struct. In general, the preferred approach for hashes moving forward is to store hash values in complex data structures, particularly those that will be used for cache entries, and accept pointers to hashes in arguments to functions. Some of the reasoning behind making this change is: - It is generally preferred to avoid storing pointers to data in cache objects since doing so can easily lead to storing interior pointers into other structs that then can't be GC'd - Keeping the hash values directly in the block node provides better cache locality |
||
---|---|---|
.. | ||
cpuminer | ||
log.go | ||
mining.go | ||
mining_test.go | ||
policy.go | ||
policy_test.go | ||
README.md |
mining
[] (https://travis-ci.org/btcsuite/btcd) ![ISC License] (http://img.shields.io/badge/license-ISC-blue.svg) [] (http://godoc.org/github.com/btcsuite/btcd/mining)
Overview
This package is currently a work in progress.
Installation and Updating
$ go get -u github.com/btcsuite/btcd/mining
License
Package mining is licensed under the copyfree ISC License.