Tests fixed
This commit is contained in:
parent
b5d1e5c94e
commit
f6fffefec9
@ -98,7 +98,7 @@ func TestRPCIntegration(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(skippedTests) > 0 {
|
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{}
|
addrs := []string{}
|
||||||
for _, vin := range tx.Vin {
|
for _, vin := range tx.Vin {
|
||||||
for _, a := range vin.Addresses {
|
for _, a := range vin.Addresses {
|
||||||
addrs = append(addrs, a)
|
if isSearchableAddr(a) {
|
||||||
|
addrs = append(addrs, a)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, vout := range tx.Vout {
|
for _, vout := range tx.Vout {
|
||||||
for _, a := range vout.ScriptPubKey.Addresses {
|
for _, a := range vout.ScriptPubKey.Addresses {
|
||||||
addrs = append(addrs, a)
|
if isSearchableAddr(a) {
|
||||||
|
addrs = append(addrs, a)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(addrs) > 0 {
|
if len(addrs) > 0 {
|
||||||
@ -457,6 +461,10 @@ func getMempoolAddresses(t *testing.T, h *TestHandler, txs []string) map[string]
|
|||||||
return txid2addrs
|
return txid2addrs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func isSearchableAddr(addr string) bool {
|
||||||
|
return len(addr) > 3 && addr[:3] != "OP_"
|
||||||
|
}
|
||||||
|
|
||||||
func intersect(a, b []string) []string {
|
func intersect(a, b []string) []string {
|
||||||
setA := mapset.NewSet()
|
setA := mapset.NewSet()
|
||||||
for _, v := range a {
|
for _, v := range a {
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
"block_chain": {
|
"block_chain": {
|
||||||
"parse": true,
|
"parse": true,
|
||||||
"subversion": "/Bitcoin ABC:0.17.1/",
|
"subversion": "/Bitcoin ABC:0.17.1/",
|
||||||
"address_format": "legacy",
|
"address_format": "cashaddr",
|
||||||
"mempool_workers": 8,
|
"mempool_workers": 8,
|
||||||
"mempool_sub_workers": 2,
|
"mempool_sub_workers": 2,
|
||||||
"block_addresses_to_keep": 300,
|
"block_addresses_to_keep": 300,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user