From 49d9fe4d135348e332b2f38d67ba52462503bf4d Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 5 Jun 2018 14:09:38 +0200 Subject: [PATCH] firmware: rename decred_expiry to expiry --- firmware/signing.c | 6 +++--- firmware/transaction.c | 6 +++--- firmware/transaction.h | 2 +- vendor/trezor-common | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/firmware/signing.c b/firmware/signing.c index 90f2c6528..7bff44b89 100644 --- a/firmware/signing.c +++ b/firmware/signing.c @@ -511,12 +511,12 @@ void signing_init(const SignTx *msg, const CoinInfo *_coin, const HDNode *_root) if (coin->decred) { to.version |= (DECRED_SERIALIZE_FULL << 16); to.is_decred = true; - to.decred_expiry = msg->decred_expiry; + to.expiry = msg->expiry; tx_init(&ti, inputs_count, outputs_count, version, lock_time, 0, coin->curve->hasher_sign); ti.version |= (DECRED_SERIALIZE_NO_WITNESS << 16); ti.is_decred = true; - ti.decred_expiry = msg->decred_expiry; + ti.expiry = msg->expiry; } // segwit hashes for hashPrevouts and hashSequence @@ -1014,7 +1014,7 @@ void signing_txack(TransactionType *tx) if (coin->decred) { tp.version |= (DECRED_SERIALIZE_NO_WITNESS << 16); tp.is_decred = true; - tp.decred_expiry = tx->decred_expiry; + tp.expiry = tx->expiry; } progress_meta_step = progress_step / (tp.inputs_len + tp.outputs_len); idx2 = 0; diff --git a/firmware/transaction.c b/firmware/transaction.c index 03dcbfdac..3a0b7217d 100644 --- a/firmware/transaction.c +++ b/firmware/transaction.c @@ -599,7 +599,7 @@ uint32_t tx_serialize_footer(TxStruct *tx, uint8_t *out) { memcpy(out, &(tx->lock_time), 4); if (tx->is_decred) { - memcpy(out + 4, &(tx->decred_expiry), 4); + memcpy(out + 4, &(tx->expiry), 4); return 8; } return 4; @@ -609,7 +609,7 @@ uint32_t tx_serialize_footer_hash(TxStruct *tx) { hasher_Update(&(tx->hasher), (const uint8_t *)&(tx->lock_time), 4); if (tx->is_decred) { - hasher_Update(&(tx->hasher), (const uint8_t *)&(tx->decred_expiry), 4); + hasher_Update(&(tx->hasher), (const uint8_t *)&(tx->expiry), 4); return 8; } return 4; @@ -701,7 +701,7 @@ void tx_init(TxStruct *tx, uint32_t inputs_len, uint32_t outputs_len, uint32_t v tx->size = 0; tx->is_segwit = false; tx->is_decred = false; - tx->decred_expiry = 0; + tx->expiry = 0; hasher_Init(&(tx->hasher), hasher_sign); } diff --git a/firmware/transaction.h b/firmware/transaction.h index 4363a3b2c..a875a8cee 100644 --- a/firmware/transaction.h +++ b/firmware/transaction.h @@ -34,7 +34,7 @@ typedef struct { uint32_t version; uint32_t lock_time; - uint32_t decred_expiry; + uint32_t expiry; bool is_segwit; bool is_decred; diff --git a/vendor/trezor-common b/vendor/trezor-common index 0f7118bb3..018eebac7 160000 --- a/vendor/trezor-common +++ b/vendor/trezor-common @@ -1 +1 @@ -Subproject commit 0f7118bb3d27c3c51a89c776c1b083db91f50541 +Subproject commit 018eebac7e64ed082486d746d78d279fe815c65d