func (w *Wallet) StakePoolUserInfo(userAddress hcashutil.Address) (*udb.StakePoolUser, error) {
	switch userAddress.(type) {
	case *hcashutil.AddressPubKeyHash:  
	case *hcashutil.AddressScriptHash:  
	default:
		return nil, errors.New("stake pool user address must be P2PKH or P2SH")
	}
	var user *udb.StakePoolUser
	err := walletdb.View(w.db, func(tx walletdb.ReadTx) error {
		stakemgrNs := tx.ReadBucket(wstakemgrNamespaceKey)
		var err error
		user, err = w.StakeMgr.StakePoolUserInfo(stakemgrNs, userAddress)
		return err
	})
	return user, err
}
StakePoolUserInfo returns the stake pool user information for a user
identified by their P2SH voting address.
package wallet
import (
	"errors"
	"github.com/HcashOrg/hcashutil"
	"github.com/HcashOrg/hcashwallet/wallet/udb"
	"github.com/HcashOrg/hcashwallet/walletdb"
)