diff --git a/bchain/tests/rpc/rpc_test.go b/bchain/tests/rpc/rpc_test.go index 8c9f91b5..b5658846 100644 --- a/bchain/tests/rpc/rpc_test.go +++ b/bchain/tests/rpc/rpc_test.go @@ -98,7 +98,7 @@ func TestRPCIntegration(t *testing.T) { } if len(skippedTests) > 0 { - t.Errorf("Too many skipped tests: %q", skippedTests) + t.Errorf("Too many skipped tests due to connection issues: %q", skippedTests) } } @@ -442,12 +442,16 @@ func getMempoolAddresses(t *testing.T, h *TestHandler, txs []string) map[string] addrs := []string{} for _, vin := range tx.Vin { for _, a := range vin.Addresses { - addrs = append(addrs, a) + if isSearchableAddr(a) { + addrs = append(addrs, a) + } } } for _, vout := range tx.Vout { for _, a := range vout.ScriptPubKey.Addresses { - addrs = append(addrs, a) + if isSearchableAddr(a) { + addrs = append(addrs, a) + } } } if len(addrs) > 0 { @@ -457,6 +461,10 @@ func getMempoolAddresses(t *testing.T, h *TestHandler, txs []string) map[string] return txid2addrs } +func isSearchableAddr(addr string) bool { + return len(addr) > 3 && addr[:3] != "OP_" +} + func intersect(a, b []string) []string { setA := mapset.NewSet() for _, v := range a { diff --git a/configs/coins/bcash_testnet.json b/configs/coins/bcash_testnet.json index 33427f04..462430ea 100644 --- a/configs/coins/bcash_testnet.json +++ b/configs/coins/bcash_testnet.json @@ -49,7 +49,7 @@ "block_chain": { "parse": true, "subversion": "/Bitcoin ABC:0.17.1/", - "address_format": "legacy", + "address_format": "cashaddr", "mempool_workers": 8, "mempool_sub_workers": 2, "block_addresses_to_keep": 300,