Commit Graph

23 Commits

Author SHA1 Message Date
Sky Young
88fd2c1f0b Update tests to use fclient 2019-07-19 11:47:01 -06:00
Buck Perley
f4b74003c4
indexer: add ability to track listeners and remove them on close for indexer 2019-07-03 10:55:20 -05:00
Braydon Fuller
a3a34dbfe6
test: remove test assert util and use bsert 2019-06-05 12:11:57 -07:00
Nodar Chkuaselidze
fc283caf80
test: close worker pool. limit workers to 2. 2019-05-19 20:17:39 +04:00
Braydon Fuller
ed06c2184d
indexer: check that blocks are connected
There was a rare case that a block could be incorrectly added to
the indexer if the indexer was disabled during a reorg to a height
that matched the height that was expected, and the `sync` method
for the indexer wasn't called that would detect the reorg.
2019-05-15 12:11:37 -07:00
Braydon Fuller
cede31d86f
indexer: cleanup and check pruned and index options 2019-05-15 12:11:37 -07:00
Braydon Fuller
5d18f9ba2e
indexer: index the genesis block 2019-05-15 12:11:37 -07:00
Braydon Fuller
efb2551555
indexer: fix reset and reorg handling 2019-05-15 12:11:37 -07:00
Braydon Fuller
865f7401ba
test: add test for retroactively enabling indexer 2019-05-15 12:11:37 -07:00
Braydon Fuller
b4be8574e5
test: improve addrindex tests
- Vectors for p2wsh and p2sh.
- Edge case for witness program.
- Improve determinism by not comparing mtime.
- Various edge and error cases.
2019-05-15 12:11:32 -07:00
Braydon Fuller
69e9844f82
test: cleanup and add txindex tests 2019-05-15 12:11:05 -07:00
Braydon Fuller
b37ac59973
test: add utility to wait for values 2019-05-15 12:11:05 -07:00
Braydon Fuller
bd26dbf32d
mempool: update for addrindex 2019-05-15 12:11:05 -07:00
Braydon Fuller
4c8f11ed34
node: update http for addrindex 2019-05-15 12:11:05 -07:00
Braydon Fuller
06ef0e3615
indexer: simplify addrindex query 2019-05-15 12:11:05 -07:00
Braydon Fuller
93c6ff845e
indexer: fix, simplify and rewrite indexer base
- Write indexer state and index atomically.
- Simplify chain state with current height.
- Roll forward to best height.
- Synchronize the index with the chain with common method `sync` for
  the events 'connect', 'disconnect' and 'reset'. This will prevent
  any of the events from conflicting with each other.
- Fix the chain rollback and reset.
- Make sure blocks are connected in the correct order.
- Improve logging to log similar to chain.
2019-05-15 12:02:50 -07:00
Javed Khan
e2a6a92ebc
addrindexer: index by address prefix 2019-05-15 12:02:50 -07:00
Braydon Fuller
aa3f02d585
test: initial http tests for indexer 2019-05-15 12:02:49 -07:00
Braydon Fuller
7dc55c9c3c
indexer: remove address coin index 2019-05-15 12:02:48 -07:00
Braydon Fuller
05d55efb22
indexer: fix memory and cpu exhaustion for addrindex 2019-05-15 12:02:48 -07:00
Braydon Fuller
8bff122253
indexer: use chain and blocks for indexer, remove chain client 2019-05-15 12:02:47 -07:00
Braydon Fuller
f9aab08c46
indexer: add block position to tx 2019-05-15 12:02:47 -07:00
Javed Khan
05794f5cb3
indexer: add module indexer
module indexer introduces a extensible architecture for indexing the
chain. It provides a base class which handles syncing with the chain,
handling re-orgs, interruptions, dynamic toggling, etc. TXIndexer
and AddrIndexer are provided for indexing transactions and addresses,
using the same flags as before i.e --index-tx and --index-address.
Indexes are stored in a different database and can be maintained
independently of the chain.
2019-05-15 12:02:41 -07:00