Documentation ¶
Index ¶
- Constants
- Variables
- func CheckPowNonce(difficulty *big.Int, nonce []byte, data []byte) bool
- func DifficultyToTarget(difficulty *big.Int) *big.Int
- func GetPowNonce(difficulty *big.Int, dataHash types.Hash) ([]byte, error)
- func Init(vMTestParamEnabled bool)
- func MapPowNonce(difficulty *big.Int, dataHash types.Hash, from uint64, to uint64) ([]byte, uint64, error)
- func MapPowNonce2(difficulty *big.Int, dataHash types.Hash, len uint64) ([]byte, uint64, error)
- func QuickGreater(x, y []byte) bool
- func QuickInc(x []byte) []byte
- func TargetToDifficulty(target *big.Int) *big.Int
- func Uint64ToByteArray(i uint64) [8]byte
Constants ¶
View Source
const ( // todo this is online difficulty !!! // FullThreshold = 0xffffffc000000000 FullThreshold = 0x000000000000FFFF )
Variables ¶
View Source
var VMTestParamEnabled = false
Functions ¶
func GetPowNonce ¶
data = Hash(address + prev_hash); data + nonce < target.
func MapPowNonce ¶
func MapPowNonce(difficulty *big.Int, dataHash types.Hash, from uint64, to uint64) ([]byte, uint64, error)
data = Hash(address + prev_hash); data + nonce < target.
func MapPowNonce2 ¶
data = Hash(address + prev_hash); data + nonce < target.
func QuickGreater ¶
func Uint64ToByteArray ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.