decred.org/dcrdex@v1.0.3/dex/networks/doge/params_test.go (about)

     1  package doge
     2  
     3  import (
     4  	"encoding/hex"
     5  	"testing"
     6  
     7  	btctest "decred.org/dcrdex/dex/networks/btc/test"
     8  )
     9  
    10  func TestCompatibility(t *testing.T) {
    11  	fromHex := func(str string) []byte {
    12  		b, err := hex.DecodeString(str)
    13  		if err != nil {
    14  			t.Fatalf("error decoding %s: %v", str, err)
    15  		}
    16  		return b
    17  	}
    18  	// These scripts and addresses are just copy-pasted from random
    19  	// getrawtransaction output.
    20  	items := &btctest.CompatibilityItems{
    21  		P2PKHScript: fromHex("76a914f8f0813eb71c0c5c0a8677b6e8f1e4bb870935fc88ac"),
    22  		PKHAddr:     "DTqNEQLjhn2hf8vK46py9nDohkci2BeAt1",
    23  		P2SHScript:  fromHex("a9140aa26a002d22f88c1f83d35298dc64769fe6e81a87"),
    24  		SHAddr:      "9sQVz2zRbhCAMdXb4NtoLRYzi84qAkGD5r",
    25  	}
    26  	btctest.CompatibilityCheck(t, items, MainNetParams)
    27  }