Fix OP_RETURN parser unit tests

This commit is contained in:
Martin Boehm 2018-09-11 16:22:28 +02:00
parent 402eb92c5e
commit 2c62d4d248
3 changed files with 10 additions and 3 deletions

View File

@ -157,7 +157,7 @@ func Test_GetAddressesFromAddrDesc(t *testing.T) {
{
name: "OP_RETURN hex",
parser: mainParserCashAddr,
addresses: []string{"OP_RETURN 07 2020f1686f6a20"},
addresses: []string{"OP_RETURN 2020f1686f6a20"},
searchable: false,
hex: "6a072020f1686f6a20",
wantErr: false,

View File

@ -108,10 +108,17 @@ func Test_GetAddressesFromAddrDesc(t *testing.T) {
want2: false,
wantErr: false,
},
{
name: "OP_RETURN OP_PUSHDATA1 ascii",
args: args{script: "6a4c0b446c6f7568792074657874"},
want: []string{"OP_RETURN (Dlouhy text)"},
want2: false,
wantErr: false,
},
{
name: "OP_RETURN hex",
args: args{script: "6a072020f1686f6a20"},
want: []string{"OP_RETURN 07 2020f1686f6a20"},
want: []string{"OP_RETURN 2020f1686f6a20"},
want2: false,
wantErr: false,
},

View File

@ -170,7 +170,7 @@ func Test_GetAddressesFromAddrDesc(t *testing.T) {
{
name: "OP_RETURN hex",
args: args{script: "6a072020f1686f6a20"},
want: []string{"OP_RETURN 07 2020f1686f6a20"},
want: []string{"OP_RETURN 2020f1686f6a20"},
want2: false,
wantErr: false,
},