Commit Graph

29 Commits

Author SHA1 Message Date
Braydon Fuller
667a38053b block: check block argument and fix caching
Checks that the argument sent to the endpoint for /block/ and /rawblock/ is
a 64 character hexadecimal string (blockHash), otherwise will return 404.

Uses a long cache header for for the /rawblock/ endpoint since the result will not
change, and a short cache header for the /block/ endpoint since this data references
other blocks in the chain that can change.
2016-05-26 11:21:36 -04:00
Braydon Fuller
61f0c3063a bitcoind: fix error handling bug 2016-05-16 18:32:08 -04:00
Braydon Fuller
11874a1957 blocks: handle out of range height as 404 not found 2016-05-16 18:27:27 -04:00
Braydon Fuller
c6bd150bd9 blocks: camelCase adjustments for bitcore node 2016-05-11 11:54:08 -04:00
Braydon Fuller
351c315736 common: improve error logging 2016-05-10 19:26:10 -04:00
Braydon Fuller
7973e2398a blocks: switch to use req.param
so that the last argument is the next callback
2016-05-10 16:50:28 -04:00
Braydon Fuller
310dd99086 blocks: rename moreTs -> moreTimestamp for clarity 2016-05-10 16:24:37 -04:00
Braydon Fuller
4e54d195b9 blocks: add configurable option for caches 2016-05-09 17:54:57 -04:00
Braydon Fuller
e1df171f95 blocks: cache block header info with next block with 6 confirmations 2016-04-20 10:54:10 -04:00
Braydon Fuller
b686c5bea9 blocks: fix null prevhash issue 2016-04-15 15:50:14 -04:00
Braydon Fuller
13532666c3 test: update block tests 2016-04-15 13:45:58 -04:00
Braydon Fuller
7ded22fb2c block: add raw block endpoint 2016-04-11 15:40:55 -04:00
Braydon Fuller
19c5b617d1 block: only cache block summary with height if confirmed >= 6
- update api with changes in bitcore node
- add block event
2016-04-11 10:39:46 -04:00
Braydon Fuller
3c355c30a9 blocks: added lru cache 2016-04-11 10:33:53 -04:00
Braydon Fuller
13efeec84b blocks: fix for getBlockHashesByTimestamp 2016-04-11 10:29:50 -04:00
Braydon Fuller
e4f585ad15 general: updated controllers for new api from bitcoind 2016-04-11 10:28:49 -04:00
Joel Kaartinen
c42b8d9d91 Optimize block list page to not parse all transactions from a block when
the only data that is interesting is number of transactions. Fixes 100%
CPU while building block list.
2016-03-29 12:16:14 +03:00
Braydon Fuller
94f584f792 Added configurable caching. 2015-10-23 15:20:20 -04:00
Braydon Fuller
3dfc1bc9e3 Switch to use bitcore-lib. 2015-10-16 18:14:38 -04:00
Braydon Fuller
c7054051e3 Include mining pool information. 2015-09-22 13:32:41 -04:00
Braydon Fuller
b49f1505eb Added bindings for getNextBlockHash 2015-09-21 14:37:13 -04:00
Patrick Nagurny
f359a96f9e check for valid date 2015-09-16 12:08:41 -04:00
Patrick Nagurny
3d713224bf no longer need to reverse 2015-09-15 18:23:27 -04:00
Patrick Nagurny
bc4672760c get blocks by date 2015-09-15 16:51:54 -04:00
Braydon Fuller
2ae1cdbec2 Merge pull request #359 from pnagurny/feature/main-chain
add isMainChain to block
2015-09-09 11:20:46 -04:00
Patrick Nagurny
0e538f2e06 get block difficulty 2015-09-09 10:31:09 -04:00
Patrick Nagurny
300bf67414 add isMainChain to block 2015-09-09 10:21:04 -04:00
Patrick Nagurny
3bcb0426c3 get block reward 2015-09-04 14:06:04 -04:00
Patrick Nagurny
54462019be remove files 2015-09-02 11:45:51 -04:00