1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 14:28:07 +00:00

feat(core): recognize Taproot change-outputs

This commit is contained in:
Pavol Rusnak 2021-07-19 10:30:48 +02:00 committed by Andrew Kozlik
parent 390bcf4612
commit 57fddcfd9d

View File

@ -39,6 +39,7 @@ CHANGE_OUTPUT_TO_INPUT_SCRIPT_TYPES: dict[OutputScriptType, InputScriptType] = {
OutputScriptType.PAYTOMULTISIG: InputScriptType.SPENDMULTISIG, OutputScriptType.PAYTOMULTISIG: InputScriptType.SPENDMULTISIG,
OutputScriptType.PAYTOP2SHWITNESS: InputScriptType.SPENDP2SHWITNESS, OutputScriptType.PAYTOP2SHWITNESS: InputScriptType.SPENDP2SHWITNESS,
OutputScriptType.PAYTOWITNESS: InputScriptType.SPENDWITNESS, OutputScriptType.PAYTOWITNESS: InputScriptType.SPENDWITNESS,
OutputScriptType.PAYTOTAPROOT: InputScriptType.SPENDTAPROOT,
} }
INTERNAL_INPUT_SCRIPT_TYPES = tuple(CHANGE_OUTPUT_TO_INPUT_SCRIPT_TYPES.values()) INTERNAL_INPUT_SCRIPT_TYPES = tuple(CHANGE_OUTPUT_TO_INPUT_SCRIPT_TYPES.values())
@ -52,6 +53,7 @@ SEGWIT_INPUT_SCRIPT_TYPES = (
SEGWIT_OUTPUT_SCRIPT_TYPES = ( SEGWIT_OUTPUT_SCRIPT_TYPES = (
OutputScriptType.PAYTOP2SHWITNESS, OutputScriptType.PAYTOP2SHWITNESS,
OutputScriptType.PAYTOWITNESS, OutputScriptType.PAYTOWITNESS,
OutputScriptType.PAYTOTAPROOT,
) )
NONSEGWIT_INPUT_SCRIPT_TYPES = ( NONSEGWIT_INPUT_SCRIPT_TYPES = (