rpcserver: replace DebugBuild cmp w/ IsDevBuild in AbandonChannel

This commit is contained in:
Conner Fromknecht 2018-09-26 02:43:46 -07:00
parent 5706c12d69
commit 2e489fcf24
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -1191,12 +1191,12 @@ out:
func (r *rpcServer) AbandonChannel(ctx context.Context, func (r *rpcServer) AbandonChannel(ctx context.Context,
in *lnrpc.AbandonChannelRequest) (*lnrpc.AbandonChannelResponse, error) { in *lnrpc.AbandonChannelRequest) (*lnrpc.AbandonChannelResponse, error) {
// If this isn't the debug build, then we won't allow the RPC to be // If this isn't the dev build, then we won't allow the RPC to be
// executed, as it's an advanced feature and won't be activated in // executed, as it's an advanced feature and won't be activated in
// regular production/release builds. // regular production/release builds.
if !DebugBuild { if !build.IsDevBuild() {
return nil, fmt.Errorf("AbandonChannel RPC call only " + return nil, fmt.Errorf("AbandonChannel RPC call only " +
"available in debug builds") "available in dev builds")
} }
// We'll parse out the arguments to we can obtain the chanPoint of the // We'll parse out the arguments to we can obtain the chanPoint of the