mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 01:18:28 +00:00
fixup! feat(legacy): do not support sortedmulti on legacy
This commit is contained in:
parent
7ed1c424df
commit
e7277e2591
@ -364,6 +364,11 @@ uint32_t compile_script_sig(uint32_t address_type, const uint8_t *pubkeyhash,
|
|||||||
uint32_t compile_script_multisig(const CoinInfo *coin,
|
uint32_t compile_script_multisig(const CoinInfo *coin,
|
||||||
const MultisigRedeemScriptType *multisig,
|
const MultisigRedeemScriptType *multisig,
|
||||||
uint8_t *out) {
|
uint8_t *out) {
|
||||||
|
if (multisig->pubkeys_order != MultisigPubkeysOrder_PRESERVED) {
|
||||||
|
fsm_sendFailure(FailureType_Failure_DataError,
|
||||||
|
_("Sortedmulti is not supported"));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
const uint32_t m = multisig->m;
|
const uint32_t m = multisig->m;
|
||||||
const uint32_t n = cryptoMultisigPubkeyCount(multisig);
|
const uint32_t n = cryptoMultisigPubkeyCount(multisig);
|
||||||
if (m < 1 || m > 15) return 0;
|
if (m < 1 || m > 15) return 0;
|
||||||
@ -397,6 +402,7 @@ uint32_t compile_script_multisig_hash(const CoinInfo *coin,
|
|||||||
if (multisig->pubkeys_order != MultisigPubkeysOrder_PRESERVED) {
|
if (multisig->pubkeys_order != MultisigPubkeysOrder_PRESERVED) {
|
||||||
fsm_sendFailure(FailureType_Failure_DataError,
|
fsm_sendFailure(FailureType_Failure_DataError,
|
||||||
_("Sortedmulti is not supported"));
|
_("Sortedmulti is not supported"));
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint32_t m = multisig->m;
|
const uint32_t m = multisig->m;
|
||||||
@ -447,6 +453,7 @@ uint32_t serialize_script_multisig(const CoinInfo *coin,
|
|||||||
if (multisig->pubkeys_order != MultisigPubkeysOrder_PRESERVED) {
|
if (multisig->pubkeys_order != MultisigPubkeysOrder_PRESERVED) {
|
||||||
fsm_sendFailure(FailureType_Failure_DataError,
|
fsm_sendFailure(FailureType_Failure_DataError,
|
||||||
_("Sortedmulti is not supported"));
|
_("Sortedmulti is not supported"));
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
uint32_t r = 0;
|
uint32_t r = 0;
|
||||||
#if !BITCOIN_ONLY
|
#if !BITCOIN_ONLY
|
||||||
|
Loading…
Reference in New Issue
Block a user