Page MenuHomePhabricator

[electrum] cache scriptsig for complete inputs, invalidate it for incomplete inputs
ClosedPublic

Authored by PiRK on Sep 19 2023, 06:46.

Details

Summary

When computing the scriptsig, cache it if the input is fully signed. If the input is incomplete, don't return the cached scriptsig in get_or_build_scriptsig as it could have change if the signatures are updated.

Use the built scriptsig also for equality comparison and hashing. I missed this in D14493, and it is important when comparing inputs that don't yet have a scriptsig or have just been updated (signatures added).

Test Plan

python test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable