diff --git a/chain/rpc.go b/chain/rpc.go index 4f63959..1c48181 100644 --- a/chain/rpc.go +++ b/chain/rpc.go @@ -89,7 +89,7 @@ func NewRPCClient(chainParams *chaincfg.Params, connect, user, pass string, cert // BackEnd returns the name of the driver. func (c *RPCClient) BackEnd() string { - return "" + return "lbcd" } // Start attempts to establish a client connection with the remote server. diff --git a/rpc/legacyrpc/methods.go b/rpc/legacyrpc/methods.go index 500a921..b19d8b7 100644 --- a/rpc/legacyrpc/methods.go +++ b/rpc/legacyrpc/methods.go @@ -542,7 +542,6 @@ func getAddressInfo(icmd interface{}, w *wallet.Wallet) (interface{}, error) { // type embeddedAddressInfo struct { // # Address string `json:"address"` // # ScriptPubKey string `json:"scriptPubKey"` - // Solvable bool `json:"solvable"` // Descriptor *string `json:"desc,omitempty"` // IsScript bool `json:"isscript"` // IsChange bool `json:"ischange"` @@ -649,8 +648,7 @@ func getInfo(icmd interface{}, w *wallet.Wallet, chainClient *chain.RPCClient) ( // to using the manager version. info.WalletVersion = int32(waddrmgr.LatestMgrVersion) info.Balance = bal.ToBTC() - _ = staked // TODO: add this to lbcd: - // info.Staked = staked.ToBTC() + info.Staked = staked.ToBTC() info.PaytxFee = float64(txrules.DefaultRelayFeePerKb) // We don't set the following since they don't make much sense in the // wallet architecture: diff --git a/wallet/wallet.go b/wallet/wallet.go index 4323f36..3970296 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -2655,8 +2655,9 @@ func (w *Wallet) ListUnspent(minconf, maxconf int32, ScriptPubKey: hex.EncodeToString(output.PkScript), Amount: output.Amount.ToBTC(), Confirmations: int64(confs), - Spendable: spendable, // presently false for stakes - // TODO: add an IsStake flag here to lbcd + Spendable: spendable, + // Solvable: , TODO: make this work + IsStake: isStake(output.PkScript), } // BUG: this should be a JSON array so that all