electrs
electrs copied to clipboard
Disable sigops for Liquid
Low priority, since the mempool/backend already sets sigops to 0 when Liquid network is active...
But just in case someone uses mempool/electrs for other purposes we'd like to be correct.
As you can see here, Liquid counts sigops slightly differently for peg-in inputs' witnessScripts...
Liquid https://github.com/ElementsProject/elements/blob/ae023ea98db010953bfc8aaf646b8e81ad30cdcd/src/consensus/tx_verify.cpp#L170-L188
Bitcoin https://github.com/bitcoin/bitcoin/blob/f01416e23c9c820517c37003a2a98dd46d1022ba/src/consensus/tx_verify.cpp#L158-L164
Rather than code that difference in, it'd probably be simpler to just make sigops a non-Liquid only feature.
Choices (either or):
- Support Liquid and change the calculations based on liquid feature.
- Disable sigops when using liquid