Home Reference Source
public class | source

BlockchainDifficulty

Static Method Summary

Static Public Methods
public static

getDifficulty(getDifficultyCallback: *, getTimeStampCallback: *, blockTimestamp: *, blockNumber: *): *

public static

getDifficultyMean(getDifficultyCallback: *, getTimeStampCallback: *, blockTimestamp: *, blockNumber: *): *

like the difficulty used in BITCOIN based on the Last X Blocks

Static Public Methods

public static getDifficulty(getDifficultyCallback: *, getTimeStampCallback: *, blockTimestamp: *, blockNumber: *): * source

Params:

NameTypeAttributeDescription
getDifficultyCallback *
getTimeStampCallback *
blockTimestamp *
blockNumber *

Return:

*

public static getDifficultyMean(getDifficultyCallback: *, getTimeStampCallback: *, blockTimestamp: *, blockNumber: *): * source

like the difficulty used in BITCOIN based on the Last X Blocks

every X Blocks, newDiff = prevDifficulty * (how_much_it_should_have_taken_X_Blocks) / (how_much_it_took_to_mine_X_Blocks)

Issue #1: https://github.com/WebDollar/Node-WebDollar/issues/9

Params:

NameTypeAttributeDescription
getDifficultyCallback *
getTimeStampCallback *
blockTimestamp *
blockNumber *

Return:

*