From f1e5206353f7d90ae1c61fa6f673b90e152bbdbf Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sat, 4 Nov 2023 20:55:54 -0400 Subject: [PATCH] Restore decode_signed_message --- coordinator/tributary/src/tendermint/tx.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/coordinator/tributary/src/tendermint/tx.rs b/coordinator/tributary/src/tendermint/tx.rs index 6230e5619..99d6015d2 100644 --- a/coordinator/tributary/src/tendermint/tx.rs +++ b/coordinator/tributary/src/tendermint/tx.rs @@ -63,12 +63,17 @@ impl Transaction for TendermintTx { } } -fn decode_and_verify_signed_message( +pub fn decode_signed_message( mut data: &[u8], +) -> Result, TransactionError> { + SignedMessageFor::::decode(&mut data).map_err(|_| TransactionError::InvalidContent) +} + +fn decode_and_verify_signed_message( + data: &[u8], schema: &N::SignatureScheme, ) -> Result, TransactionError> { - let msg = - SignedMessageFor::::decode(&mut data).map_err(|_| TransactionError::InvalidContent)?; + let msg = decode_signed_message::(data)?; // verify that evidence messages are signed correctly if !msg.verify_signature(schema) {