Skip to content

Commit

Permalink
[lbry] txscript: remove claim prefix for addr calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
BrannonKing authored and roylee17 committed Dec 14, 2021
1 parent f008e66 commit c923877
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion txscript/standard.go
Original file line number Diff line number Diff line change
Expand Up @@ -906,8 +906,10 @@ func scriptHashToAddrs(hash []byte, params *chaincfg.Params) []btcutil.Address {
// with an invalid script version error.
func ExtractPkScriptAddrs(pkScript []byte, chainParams *chaincfg.Params) (ScriptClass, []btcutil.Address, int, error) {

stripped := StripClaimScriptPrefix(pkScript)

// Check for pay-to-pubkey-hash script.
if hash := extractPubKeyHash(pkScript); hash != nil {
if hash := extractPubKeyHash(stripped); hash != nil {
return PubKeyHashTy, pubKeyHashToAddrs(hash, chainParams), 1, nil
}

Expand Down

0 comments on commit c923877

Please sign in to comment.