mirror of
https://github.com/Rucknium/misc-research.git
synced 2024-12-22 11:29:22 +00:00
Must get rpcport form config file
This commit is contained in:
parent
fd4bb3c584
commit
e160d6f351
1 changed files with 7 additions and 0 deletions
|
@ -16,7 +16,14 @@ current.block.height <- NA_integer_
|
||||||
n.threads <- min(c(6, parallelly::availableCores()))
|
n.threads <- min(c(6, parallelly::availableCores()))
|
||||||
# Recommended no more than 6 threads since all threads query the single blockchain daemon process.
|
# Recommended no more than 6 threads since all threads query the single blockchain daemon process.
|
||||||
|
|
||||||
|
|
||||||
blockchain.config <- rbch::conrpc(blockchain.conf.file)
|
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) {
|
getblock.doge <- function(con, blockhash, verbosity = TRUE) {
|
||||||
|
|
Loading…
Reference in a new issue