Tests fixed

This commit is contained in:
Jakub Matys 2018-09-12 10:29:16 +02:00
parent b5d1e5c94e
commit f6fffefec9
2 changed files with 12 additions and 4 deletions

View File

@ -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 {

View File

@ -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,