mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-18 18:42:06 +00:00
Segwit: Fix problems introduced by rebase
This commit is contained in:
parent
2950588271
commit
52da2fc5e7
@ -315,6 +315,7 @@ bool compile_input_script_sig(TxInputType *tinput)
|
|||||||
// Failed to derive private key
|
// Failed to derive private key
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
hdnode_fill_public_key(&node);
|
||||||
if (tinput->has_multisig) {
|
if (tinput->has_multisig) {
|
||||||
tinput->script_sig.size = compile_script_multisig(&(tinput->multisig), tinput->script_sig.bytes);
|
tinput->script_sig.size = compile_script_multisig(&(tinput->multisig), tinput->script_sig.bytes);
|
||||||
} else { // SPENDADDRESS
|
} else { // SPENDADDRESS
|
||||||
@ -478,6 +479,7 @@ void signing_txack(TransactionType *tx)
|
|||||||
idx2++;
|
idx2++;
|
||||||
send_req_2_prev_output();
|
send_req_2_prev_output();
|
||||||
} else { // last output
|
} else { // last output
|
||||||
|
uint8_t hash[32];
|
||||||
if (tp.extra_data_len > 0) { // has extra data
|
if (tp.extra_data_len > 0) { // has extra data
|
||||||
send_req_2_prev_extradata(0, MIN(1024, tp.extra_data_len));
|
send_req_2_prev_extradata(0, MIN(1024, tp.extra_data_len));
|
||||||
return;
|
return;
|
||||||
@ -488,13 +490,7 @@ void signing_txack(TransactionType *tx)
|
|||||||
signing_abort();
|
signing_abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (idx1 < inputs_count - 1) {
|
phase1_request_next_input();
|
||||||
idx1++;
|
|
||||||
send_req_1_input();
|
|
||||||
} else {
|
|
||||||
idx1 = 0;
|
|
||||||
send_req_3_output();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case STAGE_REQUEST_2_PREV_EXTRADATA:
|
case STAGE_REQUEST_2_PREV_EXTRADATA:
|
||||||
@ -835,7 +831,7 @@ void signing_txack(TransactionType *tx)
|
|||||||
resp.serialized.signature_index = idx1;
|
resp.serialized.signature_index = idx1;
|
||||||
resp.serialized.has_signature = true;
|
resp.serialized.has_signature = true;
|
||||||
resp.serialized.has_serialized_tx = true;
|
resp.serialized.has_serialized_tx = true;
|
||||||
ecdsa_sign_digest(&secp256k1, node.private_key, hash, sig, 0);
|
ecdsa_sign_digest(&secp256k1, node.private_key, hash, sig, NULL, NULL);
|
||||||
resp.serialized.signature.size = ecdsa_sig_to_der(sig, resp.serialized.signature.bytes);
|
resp.serialized.signature.size = ecdsa_sig_to_der(sig, resp.serialized.signature.bytes);
|
||||||
if (tx->inputs[0].has_multisig) {
|
if (tx->inputs[0].has_multisig) {
|
||||||
uint32_t r, i, script_len;
|
uint32_t r, i, script_len;
|
||||||
|
Loading…
Reference in New Issue
Block a user