Commit Graph

13 Commits

Author SHA1 Message Date
Larry Ruane bdaac63f3e improve reorg by using getbestblockhash 2021-08-30 16:41:24 -06:00
Larry Ruane b1f3687d83 add MempoolStream unit test 2021-07-29 13:47:53 -06:00
Larry Ruane 6357f7f15b Refactor mock Sleep, add mock Now time function
Instead of the Sleep function pointer being a standalong global
variable, move it into a new Time struct, and add a Now function
pointer, so that time.Now() can be mocked. Time.Now() isn't used yet.
This will be cleaner if we need to mock more time-related functions in
the future.
2021-07-29 13:47:53 -06:00
Larry Ruane a4cc08b89e GetBlockRange: allow start < end, return blocks in reverse order 2021-05-18 15:38:26 -06:00
Larry Ruane d7f35f2713 fix database file location bug introduced by PR320
PR 320 introduced a bug that causes the `blocks` and `lengths` database
files to be located one directory level higher than it they should be.

The bug doesn't cause any functional problem, it only makes the
lightwalletd do more work (re-download the block cache), and it also
makes it not possible to switch between testnet and mainnet.

This patch locates the database files back where they belong.
2021-01-11 12:19:51 -07:00
Larry Ruane 33e7312218 add zcashd versioning to GetLightdInfo result 2020-12-03 22:55:08 -07:00
Larry Ruane 7381129740 add GetMempoolTx() 2020-09-10 14:01:01 -06:00
Larry Ruane 38d71a8f1d don't sleep 1s for reorg, wait 2s for new blocks 2020-05-21 11:48:03 -06:00
Larry Ruane 9371f984ae GetBlockRange: don't pass mutex in channel (linter warning) 2020-05-21 11:48:03 -06:00
Larry Ruane 8974cd1586 fix merge conflicts while rebasing onto file-cache branch 2020-04-24 16:55:47 -06:00
Larry Ruane 1ff6ea4091 move block cache from memory to files 2020-04-08 18:10:50 -06:00
Larry Ruane 1dc439080b add COPYING and copyright lines 2020-03-12 12:02:55 -06:00
Larry Ruane a4f968823f test improvements, and minor cleanups 2020-01-31 16:36:31 -07:00