|
|
|
|
BitcoinCoreBlockCount (Function) In french: BitcoinCoreNombreBloc Returns the size of the blockchain known by the Bitcoin node (i.e. the number of blocks created since January 3, 2009). This makes it possible, for example, to calculate the approximate date of the next halving.
let nbBlock = BitcoinCoreBlockCount()
IF ErrorOccurred THEN
Error()
RETURN
END
nbBlocksLeft is int = 210 000 - nbBlock % 210 000
EstimatedDuration is Duration
EstimatedDuration.Minute = nbBlocksLeft*10
HalvingDate is Date = DateSys()
HalvingDate += EstimatedDuration
Trace("The next halving will happen on ", DateToString(HalvingDate) + ...
" in " + DurationToString(EstimatedDuration, " days") )
Syntax
<Result> = BitcoinCoreBlockCount()
<Result>: Integer Size of the blockchain known by the Bitcoin node. This size corresponds to the number of blocks created since January 3, 2009. Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|