17 Commits

Author SHA1 Message Date
tomFlowee 1d4b476045 Port to Qt6 and cleanup
A simple port caused a regression in the unit tests that took me a long
time to track down, as a result the code has been commented, prettyfied
and more.

The final issue was that the return time of QList::size() turned from an
int to a ulong and I stored that in a QDataStream with the streaming
operator.
On extracing the now twice as long number I just put it into an int,
causing 4 bytes to not be read and a subsequent off-by-one in reading
further data from the file (a list of ints).
2022-09-07 15:08:34 +02:00
tomFlowee b9f2c23ffb Optimize memory-access
A single lookup on a db file took 20 reads using a binary-search.
This change makes that around 15 reads, of MUCH more localized
manner.
2021-02-07 18:09:55 +01:00
tomFlowee a3cf6cbcd8 Switch to std::map / std::unordered_map 2021-02-07 13:46:57 +01:00
tomFlowee 7a6baf73e4 Optimize;
cache filesize.
2021-02-07 10:57:45 +01:00
TomZ 00814e24f9 API: Use hash of outscript instead of address
The usage of a ripe160 for bitcoin addresses in the API and in the
Indexer loses some info, specifically what kind of script it is.
Additionally not all types of scripts fit this mold. At best that means
its not future-proof.

This adds a method to the API in order to select from a Tx the hashed
outscript (thats singlehashed sha256) and refactor the address indexer
to use that instead of the ripe160 address.

The API enums broke a little, so I used the opportunity to break it a
lot and clean up the enums in order to make them more future-proof.
But, yeah, software from before this commit is protocol incompatible
with software after this commit.
2019-10-16 22:57:50 +02:00
TomZ 50b65d054b Cleanups and fixlets 2019-04-09 14:49:08 +02:00
TomZ df83dc8701 Upgrade HashStorage design phase2
Instead of merging a small list into a bigger and bigger list,
write lots of small lists (20MB each or so) and then when we hit
the wanted final size, merge all of those into one.
2019-04-09 11:19:03 +02:00
TomZ 1ce6a93984 Redo setup of HashStorage, phase 1 2019-04-08 13:19:54 +02:00
TomZ ef5dafe6e0 Add private header warnings 2019-04-06 12:28:34 +02:00
TomZ dfb28874ca Adjust design by inverting hash
Additionally I split the sql data over multiple tables
to avoid a forever-growing one.
2019-04-05 23:11:37 +02:00
TomZ 5ed3419d9b Add beginnings of the AddressIndexer as well 2019-04-04 22:46:38 +02:00
TomZ 285b27d3b8 Add multiple databases concept to HashStorage 2019-04-04 22:46:38 +02:00
TomZ 88dd81d090 Make find() work properly 2019-04-03 18:55:33 +02:00
TomZ 3afd867454 Add binary search to the HashStorage 2019-04-02 12:07:08 +02:00
TomZ 5767012a9b Make second finalize() work 2019-04-01 22:53:39 +02:00
TomZ 836a558bd2 Make hashstorage level 2 work a little 2019-04-01 21:15:24 +02:00
TomZ 4155557c2f Start working on the HashStorage class 2019-04-01 18:34:39 +02:00