I fixed an issue in the get_pubkey_from_input
function where the loop for extracting the public key from the scriptSig wasn’t correctly handling the range of indices. The loop now starts from the correct index, ensuring that the last 33 bytes of the vin.scriptSig
are properly checked against the scriptPubKey
hash. This change ensures the function works as intended without going out of bounds or missing the correct data.
Changes:
- Adjusted the loop range to correctly shift the window over the last 33 bytes of
vin.scriptSig
. - Added a check to ensure that we don’t go out of bounds when slicing the data.
This should resolve the issue with incorrectly processed scriptSig data.