[lbry] txscript: remove claim prefix for addr calculation
This commit is contained in:
parent
2765ac7215
commit
62f2be3284
1 changed files with 2 additions and 0 deletions
|
@ -906,6 +906,8 @@ func scriptHashToAddrs(hash []byte, params *chaincfg.Params) []btcutil.Address {
|
||||||
// with an invalid script version error.
|
// with an invalid script version error.
|
||||||
func ExtractPkScriptAddrs(pkScript []byte, chainParams *chaincfg.Params) (ScriptClass, []btcutil.Address, int, error) {
|
func ExtractPkScriptAddrs(pkScript []byte, chainParams *chaincfg.Params) (ScriptClass, []btcutil.Address, int, error) {
|
||||||
|
|
||||||
|
pkScript = StripClaimScriptPrefix(pkScript)
|
||||||
|
|
||||||
// Check for pay-to-pubkey-hash script.
|
// Check for pay-to-pubkey-hash script.
|
||||||
if hash := extractPubKeyHash(pkScript); hash != nil {
|
if hash := extractPubKeyHash(pkScript); hash != nil {
|
||||||
return PubKeyHashTy, pubKeyHashToAddrs(hash, chainParams), 1, nil
|
return PubKeyHashTy, pubKeyHashToAddrs(hash, chainParams), 1, nil
|
||||||
|
|
Loading…
Reference in a new issue