mirror of
https://github.com/serai-dex/serai.git
synced 2024-11-17 01:17:36 +00:00
Error when a message is passed to a Monero TransactionMachine
This commit is contained in:
parent
8e8bfabc83
commit
e1831ee5af
1 changed files with 9 additions and 2 deletions
|
@ -175,13 +175,20 @@ impl StateMachine for TransactionMachine {
|
|||
fn sign(
|
||||
&mut self,
|
||||
mut commitments: HashMap<u16, Vec<u8>>,
|
||||
// Drop FROST's 'msg' since we calculate the actual message in this function
|
||||
_: &[u8]
|
||||
msg: &[u8]
|
||||
) -> Result<Vec<u8>, FrostError> {
|
||||
if self.state() != State::Preprocessed {
|
||||
Err(FrostError::InvalidSignTransition(State::Preprocessed, self.state()))?;
|
||||
}
|
||||
|
||||
if msg.len() != 0 {
|
||||
Err(
|
||||
FrostError::InternalError(
|
||||
"message was passed to the TransactionMachine when it generates its own".to_string()
|
||||
)
|
||||
)?;
|
||||
}
|
||||
|
||||
// Add all commitments to the transcript for their entropy
|
||||
// While each CLSAG will do this as they need to for security, they have their own transcripts
|
||||
// cloned from this TX's initial premise's transcript. For our TX transcript to have the CLSAG
|
||||
|
|
Loading…
Reference in a new issue