mirror of
https://github.com/Rucknium/misc-research.git
synced 2024-11-16 15:58:03 +00:00
Don't do num.as.string in XMR mempool archiver to avoid error
gsub() error: "result string is too long" when mempool size is larger than about 50MB
This commit is contained in:
parent
d34ab767e1
commit
1d07ded187
1 changed files with 3 additions and 3 deletions
|
@ -71,7 +71,7 @@ tx.pool <- c()
|
|||
|
||||
# Check that node is responding
|
||||
while(length(tx.pool) == 0) {
|
||||
tx.pool <- xmr.rpc(paste0(url.rpc, "/get_transaction_pool"))$transactions
|
||||
tx.pool <- xmr.rpc(paste0(url.rpc, "/get_transaction_pool"), num.as.string = FALSE)$transactions
|
||||
|
||||
if (length(tx.pool) > 0 && tx.pool[[1]]$receive_time == 0) {
|
||||
stop("Transaction receive_time is missing. Possible solution: remove '--restricted-rpc' monerod flag.")
|
||||
|
@ -88,9 +88,9 @@ while (TRUE) {
|
|||
|
||||
compute.time <- system.time({
|
||||
|
||||
tx.pool <- xmr.rpc(paste0(url.rpc, "/get_transaction_pool"), keep.trying.rpc = TRUE)$transactions
|
||||
tx.pool <- xmr.rpc(paste0(url.rpc, "/get_transaction_pool"), num.as.string = FALSE, keep.trying.rpc = TRUE)$transactions
|
||||
|
||||
block.header <- xmr.rpc(paste0(url.rpc, "/json_rpc"), method = "get_last_block_header")$result$block_header
|
||||
block.header <- xmr.rpc(paste0(url.rpc, "/json_rpc"), method = "get_last_block_header", num.as.string = FALSE)$result$block_header
|
||||
|
||||
block_receive_time <- round(Sys.time())
|
||||
# One second time resolution
|
||||
|
|
Loading…
Reference in a new issue