Compare commits
2 Commits
adf1e68006
...
1b5d168647
Author | SHA1 | Date |
---|---|---|
|
1b5d168647 | |
|
47f79aa62b |
|
@ -168,7 +168,7 @@ fn seda_chains() -> Vec<Blockchain> {
|
|||
let mut chains = vec![];
|
||||
|
||||
let aseda = Currency::builder()
|
||||
.coin_denom("seda")
|
||||
.coin_denom("SEDA")
|
||||
.coin_minimal_denom("aseda")
|
||||
.coin_decimals(18)
|
||||
.coin_gecko_id("ID")
|
||||
|
|
|
@ -439,14 +439,6 @@ impl Payload {
|
|||
for issuer in signature.issuer_fingerprints() {
|
||||
let mut currently_seen = std::collections::HashMap::new();
|
||||
for cert in &certs {
|
||||
if let Some(seen_index) = seen.get(&cert.fingerprint()) {
|
||||
return Err(BaseError::DuplicateSignature(
|
||||
cert.fingerprint(),
|
||||
index,
|
||||
*seen_index,
|
||||
)
|
||||
.into());
|
||||
}
|
||||
match cert
|
||||
.with_policy(&policy, None)?
|
||||
.keys()
|
||||
|
@ -456,16 +448,29 @@ impl Payload {
|
|||
.next()
|
||||
.map(|signing_key| signature.verify_hash(&signing_key, hashed.clone()))
|
||||
{
|
||||
Some(Ok(())) => {
|
||||
// key found, signature matched
|
||||
signature_matched = true;
|
||||
Some(result) => {
|
||||
// matching key found, check for duplicates
|
||||
if let Some(seen_index) = seen.get(&cert.fingerprint()) {
|
||||
return Err(BaseError::DuplicateSignature(
|
||||
cert.fingerprint(),
|
||||
index,
|
||||
*seen_index,
|
||||
)
|
||||
.into());
|
||||
}
|
||||
|
||||
// mark the cert as seen, so it isn't reusable
|
||||
currently_seen.insert(cert.fingerprint(), index);
|
||||
}
|
||||
Some(Err(e)) => {
|
||||
if error_on_invalid {
|
||||
return Err(e)?;
|
||||
match result {
|
||||
Ok(()) => {
|
||||
signature_matched = true;
|
||||
|
||||
// mark the cert as seen, so it isn't reusable
|
||||
currently_seen.insert(cert.fingerprint(), index);
|
||||
}
|
||||
Err(e) => {
|
||||
if error_on_invalid {
|
||||
return Err(e)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
None => {
|
||||
|
|
Loading…
Reference in New Issue