mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 23:08:14 +00:00
legacy: use cryptoMultisigPubkeyCount where possible
This commit is contained in:
parent
c145db7dd2
commit
9ab1554e93
@ -221,9 +221,7 @@ void fsm_msgGetAddress(const GetAddress *msg) {
|
||||
if (msg->has_multisig) {
|
||||
strlcpy(desc, "Multisig __ of __:", sizeof(desc));
|
||||
const uint32_t m = msg->multisig.m;
|
||||
const uint32_t n = msg->multisig.nodes_count
|
||||
? msg->multisig.nodes_count
|
||||
: msg->multisig.pubkeys_count;
|
||||
const uint32_t n = cryptoMultisigPubkeyCount(&(msg->multisig));
|
||||
desc[9] = (m < 10) ? ' ' : ('0' + (m / 10));
|
||||
desc[10] = '0' + (m % 10);
|
||||
desc[15] = (n < 10) ? ' ' : ('0' + (n / 10));
|
||||
|
@ -804,7 +804,7 @@ static uint32_t tx_input_script_size(const TxInputType *txinput) {
|
||||
if (txinput->has_multisig) {
|
||||
uint32_t multisig_script_size =
|
||||
TXSIZE_MULTISIGSCRIPT +
|
||||
txinput->multisig.pubkeys_count * (1 + TXSIZE_PUBKEY);
|
||||
cryptoMultisigPubkeyCount(&(txinput->multisig)) * (1 + TXSIZE_PUBKEY);
|
||||
input_script_size = 1 // the OP_FALSE bug in multisig
|
||||
+ txinput->multisig.m * (1 + TXSIZE_SIGNATURE) +
|
||||
op_push_size(multisig_script_size) +
|
||||
|
Loading…
Reference in New Issue
Block a user