Reorder fsm.c for logical grouping of signing methods

This commit is contained in:
Alex Beregszaszi 2016-05-24 22:14:10 +01:00
parent a031b79e24
commit 9c7e41f15b
1 changed files with 16 additions and 17 deletions

View File

@ -419,6 +419,22 @@ void fsm_msgSignTx(SignTx *msg)
signing_init(msg->inputs_count, msg->outputs_count, coin, node, msg->version, msg->lock_time);
}
void fsm_msgTxAck(TxAck *msg)
{
if (msg->has_tx) {
signing_txack(&(msg->tx));
} else {
fsm_sendFailure(FailureType_Failure_SyntaxError, "No transaction provided");
}
}
void fsm_msgCancel(Cancel *msg)
{
(void)msg;
recovery_abort();
signing_abort();
fsm_sendFailure(FailureType_Failure_ActionCancelled, "Aborted");
}
void fsm_msgEthereumSignTx(EthereumSignTx *msg)
{
@ -432,23 +448,6 @@ void fsm_msgEthereumTxAck(EthereumTxAck *msg)
fsm_sendFailure(FailureType_Failure_Other, "Unsupported feature");
}
void fsm_msgCancel(Cancel *msg)
{
(void)msg;
recovery_abort();
signing_abort();
fsm_sendFailure(FailureType_Failure_ActionCancelled, "Aborted");
}
void fsm_msgTxAck(TxAck *msg)
{
if (msg->has_tx) {
signing_txack(&(msg->tx));
} else {
fsm_sendFailure(FailureType_Failure_SyntaxError, "No transaction provided");
}
}
void fsm_msgCipherKeyValue(CipherKeyValue *msg)
{
if (!storage_isInitialized()) {