0

I am trying to find a way to get the number of transactions returned from the JSONRPC interface without relying on listtransactions. The reason for this is that if the wallet has too many transactions (like hundreds of thousands), it can easily flood the node's memory and cause a crash. So I would like to know if there is a less intensive way to get just the number of transactions, so I can use listtransactions with the skip= and count= parameters to iterate in reverse order.

1 Answer 1

1

OK, so I found an output field in getwalletinfo called "txcount" in the top level of the output JSON that will list the number of transactions inside the wallet.

{
  ...
  "txcount": 680899,
  ...
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.