make it way faster

there were a lot of dumb things in Ingest() that made it really slow.
Like re-hashing the tx a bunch of times.  And re-saving it to the
db redundantly.

also added local bloom filters.  Maybe some concurrency issues if you
generate an address just as you're getting a tx with that address but
that doesn't seem like a real problem.  Cheap to rescan anyway.

So it's faster and works better.
This commit is contained in:
Tadge Dryja committed 2016-02-25 21:05:01 -08:00
1 parent 2c1f42d6fd
commit d2d37ce1ab
5 files changed
+91 -42

No files matched your search

+7
View File
@@ -91,6 +91,13 @@ func OpenSPV(remoteNode string, hfn, dbfn string,
s.inWaitState = make(chan bool, 1)
go s.fPositiveHandler()
if hard {
err = s.TS.Refilter()
if err != nil {
return s, err
}
}
return s, nil
}