mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Error when a message is passed to a Monero TransactionMachine
This commit is contained in:
@@ -175,13 +175,20 @@ impl StateMachine for TransactionMachine {
|
|||||||
fn sign(
|
fn sign(
|
||||||
&mut self,
|
&mut self,
|
||||||
mut commitments: HashMap<u16, Vec<u8>>,
|
mut commitments: HashMap<u16, Vec<u8>>,
|
||||||
// Drop FROST's 'msg' since we calculate the actual message in this function
|
msg: &[u8]
|
||||||
_: &[u8]
|
|
||||||
) -> Result<Vec<u8>, FrostError> {
|
) -> Result<Vec<u8>, FrostError> {
|
||||||
if self.state() != State::Preprocessed {
|
if self.state() != State::Preprocessed {
|
||||||
Err(FrostError::InvalidSignTransition(State::Preprocessed, self.state()))?;
|
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
|
// 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
|
// 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
|
// cloned from this TX's initial premise's transcript. For our TX transcript to have the CLSAG
|
||||||
|
|||||||
Reference in New Issue
Block a user