multi: formatting and comment fixes

This commit is contained in:
Oliver Gugger committed 2022-02-10 11:02:02 +01:00
1 parent ffee7d1bcf
commit 895a2e497b
160 files changed
+159 -260

No files matched your search

-1
View File
@@ -229,7 +229,6 @@ func GetCustomCaveatCondition(mac *macaroon.Macaroon,
"%s %s ", CondLndCustom, customCaveatName,
))
for _, caveat := range mac.Caveats() {
// The caveat id has a format of
// "lnd-custom [custom-caveat-name] [custom-caveat-condition]"
// and we only want the condition part. If we match the prefix
+1
View File
@@ -76,6 +76,7 @@ func TestTimeoutConstraint(t *testing.T) {
string(testMacaroon.Caveats()[0].Id),
expectedTimeCaveatSubstring,
) {
t.Fatalf("Added caveat '%s' does not meet the expectations!",
testMacaroon.Caveats()[0].Id)
}
+1
View File
@@ -246,6 +246,7 @@ func (svc *Service) ListMacaroonIDs(ctxt context.Context) ([][]byte, error) {
// found and deleted, it will be returned.
func (svc *Service) DeleteMacaroonID(ctxt context.Context,
rootKeyID []byte) ([]byte, error) {
return svc.rks.DeleteMacaroonID(ctxt, rootKeyID)
}
-1
View File
@@ -385,7 +385,6 @@ func (r *RootKeyStorage) ListMacaroonIDs(_ context.Context) ([][]byte, error) {
// Read all the items in the bucket and append the keys, which are the
// root key IDs we want.
err := kvdb.View(r.Backend, func(tx kvdb.RTx) error {
// appendRootKey is a function closure that appends root key ID
// to rootKeySlice.
appendRootKey := func(k, _ []byte) error {