ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV and WEBDEV 2024 feature!
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / BitcoinCore functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
Example
// Get the size of the latest valid block in the chain
let nbBlock = BitcoinCoreBlockCount()
IF ErrorOccurred THEN
Error()
RETURN
END
// Calculate next halving date
nbBlocksLeft is int = 210 000  - nbBlock % 210 000 // modulo
EstimatedDuration is Duration
EstimatedDuration.Minute = nbBlocksLeft*10 // One block every 10 minutes on average
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.
Remarks
To use BitcoinCoreXXXX functions, you need to configure a server on Bitcoin Core. For more details, see Setting up and using a Bitcoin Core server.
Business / UI classification: Business Logic
Component: wd290com.dll
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/16/2024

Send a report | Local help