We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abfa486 commit 47b47ecCopy full SHA for 47b47ec
1 file changed
lib/authorization.rs
@@ -261,6 +261,14 @@ pub fn get_address(verifying_key: &VerifyingKey) -> Address {
261
pub fn verify_authorized_transaction(
262
transaction: &AuthorizedTransaction,
263
) -> Result<(), Error> {
264
+ let verifications_required = &transaction.transaction.inputs.len();
265
+ match transaction.authorizations.len().cmp(verifications_required) {
266
+ std::cmp::Ordering::Less => return Err(Error::NotEnoughAuthorizations),
267
+ std::cmp::Ordering::Equal => (),
268
+ std::cmp::Ordering::Greater => {
269
+ return Err(Error::TooManyAuthorizations);
270
+ }
271
272
let tx_bytes_canonical = borsh::to_vec(&transaction.transaction)?;
273
for auth in &transaction.authorizations {
274
if !auth
0 commit comments