Skip to content

Commit

Permalink
Must get rpcport form config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Rucknium committed Jun 1, 2022
1 parent 58bbf05 commit de3bc93
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions get-block-times.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ current.block.height <- NA_integer_
n.threads <- min(c(6, parallelly::availableCores()))
# Recommended no more than 6 threads since all threads query the single blockchain daemon process.


blockchain.config <- rbch::conrpc(blockchain.conf.file)
rpcport <- readLines(blockchain.conf.file)
rpcport <- rpcport[grepl("rpcport", rpcport) ]
if (length(rpcport) > 0) {
blockchain.config@url <- paste0("http://127.0.0.1:", gsub("[^0-9]", "", rpcport))
}



getblock.doge <- function(con, blockhash, verbosity = TRUE) {
Expand Down

0 comments on commit de3bc93

Please sign in to comment.