I'm new to Bitcoin Core development, and I am trying to find a way to execute another RPC command from within a new RPC command I'm trying to add. I believe the Node
interface has the executeRpc()
method, but I don't have access to a node
object, at least I can't find it. How can I make that rpc call?
-
1You shouldn't be calling an RPC from another RPC. If there is something that RPC does that you want to do in your own RPC, then you should move it to somewhere else and call it from both RPCs.– Andrew Chow ♦Aug 2, 2021 at 2:04
-
I looked at that, but that's too complicated, it would require too much messy refactoring.– andrewzAug 2, 2021 at 2:06
-
"but I don't have access to a node object" Have you tried using a callback? What are you trying to do exactly? As Andrew Chow stated you should be able to do these as separate calls.– m1xolyd1anAug 2, 2021 at 3:36
Add a comment
|