-
I have Electrs running and it is working fine, I am playing around with some Python code and when calling blockchain.scripthash.get_balance or blockchain.scripthash.listunspent I see "your wallet uses less efficient method of querying electrs, consider contacting the developer of your wallet. Reason: blockchain.scripthash.get_balance called for unsubscribed scripthash" appearing in the logs. Is there a more efficient way of querying electrs and if so, what method should I use? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You need to subscribe to the scripthash first and then query the balance. Note that this makes most sense when you use it for long-term monitoring. IIUC a one-off script will be equally inefficient in both cases. |
Beta Was this translation helpful? Give feedback.
You need to subscribe to the scripthash first and then query the balance. Note that this makes most sense when you use it for long-term monitoring. IIUC a one-off script will be equally inefficient in both cases.