Monorepo for Tangled

commitverify: skip unsigned commits before DB lookup

Signed-off-by: Matías Insaurralde <matias@insaurral.de>

authored by matias.tngl.sh and committed by tangled.org c96d2e51 1bed7ea2

+6
+6
appview/commitverify/verify.go
··· 40 40 didPubkeyCache := make(map[string][]models.PublicKey) 41 41 42 42 for _, commit := range ndCommits { 43 + // skip unsigned commits early: no signature means no DB lookup needed, 44 + // and most commits in a typical log are unsigned. 45 + if commit.PGPSignature == "" { 46 + continue 47 + } 48 + 43 49 committerEmail := commit.Committer.Email 44 50 if did, exists := emailToDid[committerEmail]; exists { 45 51 // check if we've already fetched public keys for this did