Documentation ¶
Index ¶
- Constants
- Variables
- func Blake2bl(data string) string
- func Blake2blFromBytes(data []byte) []byte
- func CalcDistance(work []byte, soln []byte) uint64
- func Eval(work, miner_key, merkle_root, nonce []byte, timestamp uint64) uint64
- func EvalString(work, miner_key, merkle_root, nonce string, timestamp uint64) uint64
- func GetDifficultyPreExp(currentTimestamp, lastBlockTimestamp uint64, ...) *big.Int
- func GetExpFactorDiff(calcDiff *big.Int, lastBlockHeight uint64) *big.Int
- func Verify(Difficulty *big.Int, Work, MinerKey, MerkleRoot, Nonce string, ...) bool
Constants ¶
View Source
const ( MIN_DIFFICULTY = uint64(200012262029662) MIN_DIFFICULTY_AT = uint64(306612262029662) DIFF_BUILD_GENESIS = uint64(290112262029012) DIFF_BT_A = uint64(298678954710059) DIFF_BT_X = uint64(291678954710059) DIFF_AT_A = uint64(311678954710059) // BT PERIOD BT_A = uint64(1587132412) BT_B = uint64(1590157894) BT_C = uint64(1590283479) BT_D = uint64(1590337524) BT_E = uint64(1591666381) BT_F = uint64(1596864102) BT_G = uint64(1597558249) BT_H = uint64(1591666380) // AT PERIOD AT_A = uint64(1625431234) AT_B = uint64(1640266692) AT_C = uint64(1642981050) AT_D = uint64(1644536250) // WIRELESS TRANSMITION MINIMUM WIREMIN_A = uint64(1647116144) WIREMIN_B = uint64(1647126841) // Special block times (magic numbers in js node) SPECIAL_BLOCKTIME_ONE = uint64(1587132449) SPECIAL_BLOCKTIME_TWO = uint64(1590132950) SPECIAL_BLOCKTIME_THREE = uint64(1646773191) SPECIAL_BLOCKTIME_FOUR = uint64(1647022731) SPECIAL_BLOCKTIME_FIVE = uint64(1647039583) )
Variables ¶
View Source
var BIG_1000 = new(big.Int).SetInt64(1000)
View Source
var BIG_6000 = new(big.Int).SetInt64(6000)
View Source
var BIG_DECAYCONSTANT = new(big.Int).SetInt64(66000000)
View Source
var BIG_EIGHTYSIX = new(big.Int).SetInt64(86)
View Source
var BIG_MAGICNUMBER1 = new(big.Int).SetInt64(1615500)
View Source
var BIG_MAGICNUMBER2 = new(big.Int).SetInt64(161550000)
View Source
var BIG_MAGICNUMBER3 = new(big.Int).SetInt64(1215500)
View Source
var BIG_MAGICNUMBER4 = new(big.Int).SetInt64(1506600)
View Source
var BIG_MAGICNUMBER5 = new(big.Int).SetInt64(16155)
View Source
var BIG_MAGICNUMBER6 = new(big.Int).SetInt64(15066)
View Source
var BIG_MINUS99 = new(big.Int).SetInt64(-99)
View Source
var BIG_ONE = new(big.Int).SetInt64(1)
View Source
var BIG_STALEWEIGHT = new(big.Int).SetInt64(10)
View Source
var BIG_THIRTYSIX = new(big.Int).SetInt64(36)
View Source
var BIG_THREE = new(big.Int).SetInt64(3)
View Source
var BIG_TIMEWINDOW = new(big.Int).SetInt64(8)
View Source
var BIG_TWO = new(big.Int).SetInt64(2)
View Source
var BIG_ZERO = new(big.Int).SetInt64(0)
Functions ¶
func Blake2blFromBytes ¶
func CalcDistance ¶
func EvalString ¶
func GetDifficultyPreExp ¶ added in v0.0.7
func GetDifficultyPreExp(currentTimestamp, lastBlockTimestamp uint64, lastBlockDiff, minimumDiff *big.Int, nNewBlocks int64, newestHeaderInBlock *p2p_pb.BlockchainHeader) *big.Int
why is all of this in BigInt if they squish it back to a uint64 in js?
func GetExpFactorDiff ¶ added in v0.0.7
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.