Commit Graph

647 Commits

Author SHA1 Message Date
sairajzero
7409dbb77d Bug fixes
- Fixed: incorrect data returned via `from` and `to` option
- Fixed: Missing data due to unordered items in getAddressHistory
- Fixed: callback invoked multiple items in _streamAddressSummary due to queue parallel limit
- Fixed: Queue drain being invoked before mempool txs are pushed into queue
2023-02-05 19:03:11 +05:30
sairajzero
774d830fff Improvements to API query options
- Stop request-stream process when stop-flag is on
- Changed: order of reading db to forward (so that continuity will be preserved with `after` option and ws api calls). And changes required for the same.
- Deprecating options (from and to) in calls that are not supported
- Added: Temporary support for from and to option in getAddressHistory
2023-02-05 03:12:04 +05:30
sairajzero
3a75002efc API Query options
- Fixed: option `start` to query from blockheight
- Added option `after`: pass this option in API to get list after the given txid
Note: If both `start` and `after` are given, then greater height will be used
Note: invalid or unconfirmed txid cannot be used in `after` option and will be ignored
2023-02-04 20:29:41 +05:30
sairajzero
d9579853ad Improve handling of duplicate tx query
- temporarily store txids to ignore duplication
- removed the queue pause() and resume() in _streamAddressSummary
2023-02-02 19:14:29 +05:30
sairajzero
3fbcbbe7bc Fixed: APIs giving incorrect data
- Fixed: addr API giving decimals in satoshi values
- Fixed: Incorrect balance, totalSent, totalReceived values returned in API calls (issue: duplication)
- Fixed: incorrect totalCount value in addr API and duplication of tx list
2023-01-28 21:55:58 +05:30
sairajzero
dbfe39991f Fixed: Address-summary request not responding 2023-01-28 02:04:40 +05:30
sairajzero
2145fdb056 pass 'express-ws' module to service setupRoutes
- flosight-api uses 'express-ws' module for ws api calls
2023-01-27 18:07:38 +05:30
sairajzero
4472ed8394 Changing fns to use _streamAddressSummary
Functions updated:
- getAddressHistory
- getAddressSummary

(old fns are kept as it is and renamed to __getAddressHistory and __getAddressSummary respectively)
2023-01-27 17:38:37 +05:30
sairajzero
e13bd5e3e6 Adding _streamAddressSummary
- Fn uses streamer to process data. Thus doesnt store the entire list of txid or tx details
- streamer fn can process the tx data as required
2023-01-27 17:36:39 +05:30
sairajzero
0283be05db Limit max response size 2023-01-27 17:31:02 +05:30
sairajzero
69e9465b93 block service: set MAX_IGNORED_BLOCK to 16 2023-01-18 00:19:20 +05:30
sairajzero
700abe0500 hotfix: block subscription getting stuck
- Issue: Block subscription getting stuck when a (missing) block wasn't received by block service.
- Solution: Re-trigger the sync process when too many blocks ignored

- Others: fixed a typo in _reportInterval property
2023-01-17 21:54:48 +05:30
sairajzero
0572ee6b35 header: clear _syncCheckInterval upon synced
Header service: clear _syncCheckInterval to null when clearing interval after sync completed
2023-01-17 16:44:42 +05:30
sairajzero
ece347c825 hotfix: best header not updating for prev fix
- updated header service best header from fcoin node directly.
- set interval check only if fcoin is started by flocore (else header best height ll not get updated and sync complete incorrectly)
2023-01-15 00:02:25 +05:30
sairajzero
f9e2ed304b hotfix for unresponsive header sync 2023-01-11 03:38:38 +05:30
00515c5378
Update index.js
Added a missing return HeaderService.prototype._handleError
2023-01-09 05:12:39 +05:30
4113d9cfd0
Update index.js 2022-01-25 11:23:06 +05:30
7fa2f096df
Update reorg.js 2022-01-25 11:18:46 +05:30
fcecf08ac0
Update reorg.js 2022-01-25 11:18:13 +05:30
af6048de93
Update index.js 2022-01-25 11:13:27 +05:30
d47b6047e5
Update index.js 2022-01-25 11:00:27 +05:30
c525516a95
Update reorg.js 2022-01-25 10:57:40 +05:30
0eaa4b6fd2
Update index.js 2022-01-25 10:54:54 +05:30
2921e389df
Update block_handler.js 2022-01-25 00:31:31 +05:30
522d00bd52
Update index.js 2022-01-25 00:25:25 +05:30
821aae706d
Update index.js 2022-01-25 00:22:55 +05:30
18d1a16b0c
Update reorg.js 2022-01-25 00:07:57 +05:30
9c0ec67ccf
Update index.js 2022-01-25 00:03:52 +05:30
f0768027c9
Update index.js 2022-01-24 18:06:15 +05:30
80f22f731f
Update index.js 2022-01-24 17:57:48 +05:30
81a3d5f8ff
Update reorg.js 2022-01-24 17:56:37 +05:30
69fc6790ae
Update reorg.js 2022-01-24 17:55:39 +05:30
5db68b6bb7
Update reorg.js 2022-01-24 17:53:30 +05:30
091d7aa863
Update reorg.js 2022-01-24 17:52:14 +05:30
582bdd698a
Update reorg.js 2022-01-24 17:50:10 +05:30
726156843e
Update index.js 2022-01-24 17:45:10 +05:30
846f85e2f8
Update block_handler.js 2022-01-24 17:40:20 +05:30
ca47013c5a
Update block_handler.js 2022-01-24 15:17:50 +05:30
82357f2ecc
Update reorg.js 2022-01-24 15:17:02 +05:30
c3cc5f7465
Update index.js 2022-01-24 15:16:15 +05:30
1888b4a4ae
Throwing error removed
new Error was stopping the running instance of flosight. Substituted by log.info
2022-01-24 15:15:11 +05:30
05c6cd7739
Fixed header existence conditions 2021-05-25 11:07:56 +05:30
2c37e05ff7
Added test to check header.height 2021-05-25 11:01:31 +05:30
sairajzero
0cfb80a164 reverting log.info to log.debug 2021-05-24 17:56:13 +05:30
11b0a58351
Fixed syntax issue 2021-05-24 16:54:44 +05:30
869a7c21b4
Converted _sync log.debug to log.info 2021-05-24 16:29:15 +05:30
17dd83de10
db index.js asserts removed for resilience 2021-05-20 09:40:40 +05:30
bad1fb2552
Updated definition of index.log 2021-05-18 11:02:41 +05:30
5344d9cd5b
Fixed the conditional operator 2021-05-17 16:14:54 +05:30
89c43cd9a7
Fixing the conditional operator 2021-05-17 16:11:11 +05:30