Commit Graph

189 Commits

Author SHA1 Message Date
sairajzero
6beb2ecd06 Adding function to delete cache for a given addr
Adding _deleteCache: deletes the cache for given address (useful for dev purposes or to recalculate caches)
2023-04-19 02:31:04 +05:30
sairajzero
10d9459f26 Bug fix: unconfirmed-tx values corrupting cache 2023-04-19 01:24:37 +05:30
sairajzero
8b07a1e4a5 separate MAX_TX_QUERY_LIMIT for each query type 2023-04-19 01:03:45 +05:30
sairajzero
4afb0dfaaa Bug fix: cache summary not working properly 2023-04-19 00:45:44 +05:30
sairajzero
6b794aa9a3 Fixes: cache storing unconfirmed values
- removed unconfirmed values from cache store and get
-  do not update lastItem value for unconfirmed tx
2023-04-18 04:37:01 +05:30
sairajzero
adb81616aa Run cache summary
run cache storage for address summary in background when queried result is incomplete
2023-04-18 04:23:41 +05:30
sairajzero
3982807b32 Cache address-summary
Store cache of address summary in db when address has more than MAX_TX_QUERY_LIMIT
2023-04-17 20:13:29 +05:30
sairajzero
0a3a1b5ea6 changing typeof to equivalent lodash 2023-04-17 20:07:12 +05:30
sairajzero
df7710ded1 Adding option mempoolOnly in querying
- mempoolOnly option make the query in db from mempool only (ie, unconfirmed tx only
2023-04-13 03:52:02 +05:30
sairajzero
27f3993884 Fixed: inconsistency addrs API on multiple address
- Fixed: addrs API on multiple addresses when total tx is more than 1000 (MAX_TX_QUERY_LIMIT) giving inconsistent list of tx due to order messed up in parallel query
2023-04-13 02:26:33 +05:30
sairajzero
71bcafb243 Limited data responses identification
- address-query responses data has `incomplete` property set to `true` when addr has more than 1000 (MAX_TX_QUERY_LIMIT)
2023-04-11 04:04:19 +05:30
sairajzero
1b6352573f Limit all address query to MAX_TX_QUERY_LIMIT
- any address data API will now max out at 1000 (MAX_TX_QUERY_LIMIT)
- For addrs with more than 1000 tx, use chained API query to get the complete data (like balance, txid, etc)

- set parallel queue limit to 1: preserve consistency in API queries (and prevent incorrect data)
2023-04-11 03:49:21 +05:30
sairajzero
7f86e488e4 bug fix
Fixed bug: api on addr not giving response (timeoout) when it has only 1 tx
2023-04-06 22:25:03 +05:30
sairajzero
37e08b0801 Bug fix
- Fixed: Incorrect ordering of tx list with unconfirmed tx
2023-02-06 02:02:52 +05:30
sairajzero
bca4fe4f97 Bug fix
- Fixed: data inconsistency and continuity lost in chain querying of tx details
- Fixed: Not getting response when query has no tx. (ie, either address has no tx, or using the most recent tx as the key in `after` option)
2023-02-05 23:01:06 +05:30
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
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
Sky Young
02cc97b0a1 Pass network to Address.toString() 2019-08-16 09:24:20 -06:00
Sky Young
e7ef0db2cb Merge branch 'master' of https://github.com/bitpay/bitcore-node into bitpay-master 2018-08-06 11:12:20 -07:00
Matias Alejo Garcia
34f31ac57d
Revert "Revert "add txIdList cache"" 2018-04-12 14:41:18 -03:00
Matias Alejo Garcia
bf8f25d9eb
Revert "add txIdList cache" 2018-04-12 12:30:09 -03:00
Matias Alejo Garcia
ddda913ccd add txIdList cache 2018-02-12 00:48:30 -03:00
Matias Alejo Garcia
0c24271833 change order to 'desc' 2018-02-11 19:47:52 -03:00
Matias Alejo Garcia
01a3df31c8 fix history sorting when paging results 2018-02-11 15:44:39 -03:00
OstlerDev
4a9658184a btc -> flo 2018-01-15 16:43:07 -08:00
Chris Kleeschulte
0e421de897
Fixed spent status from getAddressHistory. 2017-11-22 15:56:36 -05:00
Chris Kleeschulte
b138a558ae
Merge branch 'master' of github.com:kleetus/bitcore-node 2017-11-08 19:04:10 -05:00
Chris Kleeschulte
9bdd2aa86d
Fixed sorting and filtering problem. 2017-11-08 19:01:13 -05:00
Chris Kleeschulte
af23a8c6e2
Removed console.log 2017-11-08 09:37:25 -05:00
Chris Kleeschulte
9a00622de4
Fixed getAddressHistory. 2017-11-07 21:37:54 -05:00
Chris Kleeschulte
9a1f1db523
Fixed ordering of txs. 2017-11-07 15:36:38 -05:00
Chris Kleeschulte
6b8129fdb3
Fixed getAddressHistory. 2017-11-07 00:30:26 -05:00
Chris Kleeschulte
c2117146c1
Fixed where next is being called. 2017-11-06 19:32:00 -05:00
Chris Kleeschulte
b1fe37c260
Fixed missed call to next. 2017-11-06 19:08:35 -05:00
Chris Kleeschulte
74d3c0212b
Improved getAddressHistory. 2017-11-05 18:14:19 -05:00
Chris Kleeschulte
d55986be57
Fixed tests. 2017-11-05 07:57:27 -05:00
Chris Kleeschulte
00a5ea65b4
Removed unneeded indexes. 2017-11-04 17:47:29 -04:00
Chris Kleeschulte
765b7288a7
wip on fix for txs list. 2017-11-03 18:23:42 -04:00
Chris Kleeschulte
a63761d0b2
Fixed call to map series. 2017-11-02 17:41:50 -04:00
Chris Kleeschulte
725b58cd15
Fixed finding txs after sending. 2017-11-02 11:59:06 -04:00
Chris Kleeschulte
baf75b2d60
Fixed confirmations. 2017-11-01 16:00:39 -04:00
Chris Kleeschulte
4f46947516
Fixed tx api call. 2017-10-20 10:04:33 -04:00
Chris Kleeschulte
b129bc1048
WIP 2017-10-19 19:32:20 -04:00