mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 11:28:14 +00:00
signing: add default values for branch_id (zcash)
This commit is contained in:
parent
26f9b5ba81
commit
4bc37c6b82
@ -487,6 +487,17 @@ void signing_init(const SignTx *msg, const CoinInfo *_coin, const HDNode *_root)
|
|||||||
overwintered = msg->has_overwintered && msg->overwintered;
|
overwintered = msg->has_overwintered && msg->overwintered;
|
||||||
version_group_id = msg->version_group_id;
|
version_group_id = msg->version_group_id;
|
||||||
branch_id = msg->branch_id;
|
branch_id = msg->branch_id;
|
||||||
|
// set default values for Zcash if branch_id is unset
|
||||||
|
if (overwintered && (branch_id == 0)) {
|
||||||
|
switch (version) {
|
||||||
|
case 3:
|
||||||
|
branch_id = 0x5BA81B19; // Overwinter
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
branch_id = 0x76B809BB; // Sapling
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t size = TXSIZE_HEADER + TXSIZE_FOOTER + ser_length_size(inputs_count) + ser_length_size(outputs_count);
|
uint32_t size = TXSIZE_HEADER + TXSIZE_FOOTER + ser_length_size(inputs_count) + ser_length_size(outputs_count);
|
||||||
if (coin->decred) {
|
if (coin->decred) {
|
||||||
|
Loading…
Reference in New Issue
Block a user