Duplicate script hash subscription notification?
blockchain.scripthash.subscribe
On regtest, when I mine a block with unconfirmed transaction, I get 2 notifications from the subscription method above. Each has a different status hash.
I've got a logic tied to this notification and I'd like to NOT run it twice after the transaction is confirmed.
Is this intended behaviour?
I've solved it for my case by hashing the result of blockchain.scripthash.get_history and skipping further processing for the duplicate notification. I've assumed that's what the electrum server does to generate status hash but apparently there are more inputs.
Still curious to hear why is there a duplicate notification.
It's possible there is a race between updating the mempool, and detecting a new block so you are getting 2 notifications instead of 1.