mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-02 03:54:26 +02:00
macaroons: add error reporting for macaroon constraints
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
679e86174f
commit
7df503575c
5
lnd.go
5
lnd.go
@@ -568,8 +568,11 @@ func genMacaroons(svc *bakery.Service, admFile, roFile string) error {
|
||||
}
|
||||
|
||||
// Generate the read-only macaroon and write it to a file.
|
||||
roMacaroon := macaroons.AddConstraints(admMacaroon,
|
||||
roMacaroon, err := macaroons.AddConstraints(admMacaroon,
|
||||
macaroons.PermissionsConstraint(roPermissions...))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
roBytes, err := roMacaroon.MarshalBinary()
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user