Skip to content

Commit

Permalink
Fixed 'ExamplePayToAddrScript' and 'ExampleExtractScriptPubKeyAddress…
Browse files Browse the repository at this point in the history
…' test cases
  • Loading branch information
lemois-1337 committed Feb 14, 2024
1 parent 4f48ae8 commit c864cc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions domain/consensus/utils/txscript/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import (
"github.com/karlsen-network/karlsend/util"
)

// This example demonstrates creating a script which pays to a kaspa address.
// This example demonstrates creating a script which pays to a karlsen address.
// It also prints the created script hex and uses the DisasmString function to
// display the disassembled script.
func ExamplePayToAddrScript() {
// Parse the address to send the coins to into a util.Address
// which is useful to ensure the accuracy of the address and determine
// the address type. It is also required for the upcoming call to
// PayToAddrScript.
addressStr := "kaspa:qqj9fg59mptxkr9j0y53j5mwurcmda5mtza9n6v9pm9uj8h0wgk6uma5pvumr"
addressStr := "karlsen:qqj9fg59mptxkr9j0y53j5mwurcmda5mtza9n6v9pm9uj8h0wgk6u32akz3mg"
address, err := util.DecodeAddress(addressStr, util.Bech32PrefixKaspa)
if err != nil {
fmt.Println(err)
Expand Down Expand Up @@ -76,5 +76,5 @@ func ExampleExtractScriptPubKeyAddress() {

// Output:
// Script Class: pubkey
// Address: kaspa:qzy6cf82zzah2xh5jwtz8nx9u4gdj6zzke8gljs0v055ksmnl424u6fv7ajrs
// Address: karlsen:qzy6cf82zzah2xh5jwtz8nx9u4gdj6zzke8gljs0v055ksmnl424us79fnlrm
}

0 comments on commit c864cc0

Please sign in to comment.