mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 06:07:16 +01:00
multi: formatting and comment fixes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user