btcjson: add ErrRPCClientNodeNotAdded

This commit is contained in:
David Hill 2016-11-14 18:44:38 -05:00
parent 7cc630b335
commit d9a674e1b7
2 changed files with 3 additions and 2 deletions

View file

@ -45,6 +45,7 @@ const (
const ( const (
ErrRPCClientNotConnected RPCErrorCode = -9 ErrRPCClientNotConnected RPCErrorCode = -9
ErrRPCClientInInitialDownload RPCErrorCode = -10 ErrRPCClientInInitialDownload RPCErrorCode = -10
ErrRPCClientNodeNotAdded RPCErrorCode = -24
) )
// Wallet JSON errors // Wallet JSON errors

View file

@ -917,7 +917,7 @@ func handleGetAddedNodeInfo(s *rpcServer, cmd interface{}, closeChan <-chan stru
} }
if !found { if !found {
return nil, &btcjson.RPCError{ return nil, &btcjson.RPCError{
Code: -24, // TODO: ErrRPCClientNodeNotAdded Code: btcjson.ErrRPCClientNodeNotAdded,
Message: "Node has not been added", Message: "Node has not been added",
} }
} }
@ -1946,7 +1946,7 @@ func handleGetBlockTemplateProposal(s *rpcServer, request *btcjson.TemplateReque
err := rpcsLog.Errorf("Failed to process block "+ err := rpcsLog.Errorf("Failed to process block "+
"proposal: %v", err) "proposal: %v", err)
return nil, &btcjson.RPCError{ return nil, &btcjson.RPCError{
Code: -25, // TODO: ErrRpcVerify Code: btcjson.ErrRPCVerify,
Message: err.Error(), Message: err.Error(),
} }
} }