multi: formatting and comment fixes

This commit is contained in:
Oliver Gugger
2022-02-07 13:58:28 +01:00
parent ffee7d1bcf
commit 895a2e497b
160 changed files with 159 additions and 260 deletions

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

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)
}

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)
}

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 {