Commit Graph

108 Commits

Author SHA1 Message Date
Braydon Fuller 4fcec8755c Address Service: Fixed many bugs from tests
- Refactored getAddressSummary and added several tests
- Fixed bugs revealed from the integration regtests
- Updated many unit tests
2016-01-13 17:15:14 -05:00
Samuel Reed 3214390d4c
Fix #377; db must contain hash type, not just hash.
Prevents erroneous crediting of all transactions to both the
p2pkh and the corresponding p2sh address.
2016-01-11 09:47:00 -06:00
Braydon Fuller 89ef28f0b7 Optimize mempool address index memory footprint
- Adds default to store a large portion of the mempool index in leveldb
- Includes an option to use memdown to have the mempool index in-memory
2015-10-30 18:36:16 -04:00
Braydon Fuller f0ec424161 Added bindings to be able to listen to tx leaving mempool. 2015-10-29 16:15:00 -04:00
Patrick Nagurny 9bdd9e7995 unconfirmed balance shouldn't include confirmed balance 2015-10-21 18:25:57 -04:00
Braydon Fuller 1dec93edd4 bitcore -> bitcore-lib 2015-10-17 00:56:29 -04:00
Chris Kleeschulte cda499e059 Updated patch to support 0.11.1
- Please note the removal of leveldbwrapper patch code, this is no longer needed.
- Everything else is 100% the same.
2015-10-16 16:34:49 -04:00
Patrick Nagurny 236d44441e don't crash when sendTransaction is called with bad data 2015-10-14 10:50:50 -04:00
Braydon Fuller 539b263c67 Add spentTxId Index
- To be able to query an inputTxId and inputIndex that spends an outputTxId and outputIndex
- Extends the mempoolSpentIndex to include the inputTxId and inputIndex
2015-10-01 20:03:31 -04:00
Braydon Fuller 1490b17f9a Fix bug with getting a block index with unknown height. 2015-10-01 00:21:14 -04:00
Chris Kleeschulte af7966f94a Removed unneeded getTxOutSetInfo 2015-09-25 11:33:51 -04:00
Braydon Fuller 1183e0cae7 Service Documentation 2015-09-23 18:14:37 -04:00
Chris Kleeschulte fa59000819 Merge pull request #251 from braydonf/bug/tx-count
Fix bug with address summary transaction count.
2015-09-22 14:14:17 -04:00
Braydon Fuller 80fadc7ec3 Fix bug with address summary transaction count. 2015-09-21 17:02:11 -04:00
Braydon Fuller 8a2a0ab83c Merge pull request #250 from kleetus/feature/isSpent_mempool
isSpent logic
2015-09-21 16:47:47 -04:00
Chris Kleeschulte 7c7abd26b1 isSpent logic
- Bitcoind's CCoinsViewMempool brings the mempool into view, but will not consider outputs therein as spent
- Changed the test description to match what is happening in that view
- Once a given tx has one confirmation, then isSpent will be true for those outputs
2015-09-21 16:13:10 -04:00
Braydon Fuller 7e82c933c0 Merge pull request #249 from kleetus/feature/getNextBlockHash
Next Block Hash Bindings
2015-09-21 14:30:30 -04:00
Chris Kleeschulte 402d01d7ac Next Block Hash Bindings
- Added bindings for next block hash
- Added the reg/unit tests
2015-09-21 14:07:14 -04:00
Braydon Fuller 50ddd4b152 Merge pull request #238 from pnagurny/feature/address-summary
Get address summary
2015-09-21 12:53:27 -04:00
Chris Kleeschulte 391a84f490 - Throw error on err
- Spacing
2015-09-18 16:15:52 -04:00
Patrick Nagurny a1f4d06f27 add tests around isSpent 2015-09-18 15:31:09 -04:00
Chris Kleeschulte 96a69316b9 P2P transaction tests
- Added a regtest for sending 400 tis from a peer to bitcoind
2015-09-18 14:56:26 -04:00
Patrick Nagurny b11ab97739 add tests 2015-09-18 14:06:26 -04:00
Patrick Nagurny 4a5031a917 Merge pull request #240 from braydonf/gettxoutsetinfo
Add binding for getting transaction output set information.
2015-09-18 13:20:46 -04:00
Braydon Fuller 68368397d3 Add binding to get the best block hash. 2015-09-17 18:11:47 -04:00
Braydon Fuller 4c674a8fbb Add binding for getting transaction output set information. 2015-09-17 17:52:23 -04:00
Chris Kleeschulte c3654120ee MempoolInputIndex and MempoolOutputIndex
- Added in memory indexes for mempool input and 
output by address.
2015-09-17 14:29:11 -04:00
Braydon Fuller ad120213e1 Start of mempool address index. 2015-09-17 14:26:53 -04:00
Chris Kleeschulte 576d1712e4 Merge pull request #234 from braydonf/sendtxevent
Bindings: Send transaction emit "tx" events.
2015-09-16 10:35:10 -04:00
Braydon Fuller cadbc0a79d GetBlockIndex segmentation fault with genesis block
Fixes an bug where accessing `prevBlockIndex->phashBlock` for the
genesis block would cause a segmentation fault with an error of
"Cannot access memory at address 0x0". As the genesis block doesn't
have a previous hash, it will now set the "prevHash" to "null".
2015-09-16 09:23:13 -04:00
Braydon Fuller cf1c01acea Bindings: Send transaction emit "tx" events. 2015-09-15 18:31:52 -04:00
Braydon Fuller bfba4a1b7f Address History: Include count in response results. 2015-09-15 13:17:15 -04:00
Patrick Nagurny 696759849f Merge pull request #223 from braydonf/history
Pagination for Address History
2015-09-15 12:34:26 -04:00
Braydon Fuller 5fbd8991ed Address History: Combine addresses so that history is txid unique. 2015-09-14 21:04:54 -04:00
Braydon Fuller da1513edb2 Address History: Add additional regtest for getting history by height. 2015-09-14 17:30:10 -04:00
Braydon Fuller b1b40c892e Address History: Add getAddressHistoryCount method 2015-09-14 16:48:28 -04:00
Braydon Fuller c205f781a5 Pagination for Address History
- Reindexing the bitcore-node database is required with this change.
- Address indexes are updated to include address and height in spent index so that both inputs and outputs can be queried by address and height using "start" and "stop" to limit the range of the query.
- Address history also now supports paginated results using "from" and "to" values that indicate an index in the array.
2015-09-12 19:44:10 -04:00
Chris Kleeschulte ef49264907 gitignore, integration test, env
- Added a very common way to launch a script using the env (saving keystrokes)
- Added a gitignore for the integration/data dir
- Added a bus integration test apart from the regtest and using a test service
2015-09-11 10:58:52 -04:00
Braydon Fuller c8b0dd0999 Merge pull request #207 from kleetus/bus_integration_tests
Added integration tests for the bus
2015-09-10 14:31:42 -04:00
Chris Kleeschulte 1c567c9817 ErrorMessage lexical cast test
- sendTransaction will pass through a code and a message when the state comes up as invalid after sending a transaction that isn't signed.
2015-09-10 14:03:35 -04:00
Chris Kleeschulte 875c35de2a Added a full stack integration-style regtest for the bus
- The test exercises subscribe and calls unsubscribe.
2015-09-10 13:19:12 -04:00
Chris Kleeschulte 55a3baa1aa Renamed the bus integration tests and moved it to the test directory. 2015-09-10 13:19:12 -04:00
Chris Kleeschulte 65e09ef281 Added integration for the bus
- Added a new file that exercises the subscribe/unsubscribe/close methods with a test service
- Removed a duplicate call to inherit
2015-09-10 13:19:12 -04:00
Braydon Fuller 2f6fc6e3e9 Merge pull request #202 from pnagurny/feature/main-chain
Add isMainChain method
2015-09-09 10:08:21 -04:00
Braydon Fuller a9f990bdf4 Fixes for isMainChain binding tests. 2015-09-08 17:42:33 -04:00
Patrick Nagurny 0ff742c1b6 add isMainChain method 2015-09-08 17:38:59 -04:00
Patrick Nagurny 2469c6d3fb Merge pull request #199 from braydonf/start-error
Start/Stop Improvements
2015-09-08 17:33:54 -04:00
Chris Kleeschulte ee3bad5203 Added a check for the right number of tip events.
- Since we have a spin lock that leads to the callback from a tip update, there could be cases where the callback assigned to a tip update isn't the one matching the last generate.
- The architectural decision is to leave the spin lock in place to lower the number of possible callbacks for tip updates.
2015-09-08 13:36:21 -04:00
Braydon Fuller 60af86777f Start/Stop Improvements
- A Node will shutdown if there is an error starting a service as it would lead to cascading errors.
- `node.start()` needs to be called, and nolonger is called automatically when the instance is created.
- A service will only be added to node.services after it's started
- Stopping services that are not started will gracefully continue.
- Logging sync status of db will only apply if the service is started.
- Debug log about a service without a route will always include the service name
2015-09-08 10:17:57 -04:00
Chris Kleeschulte ec720c2443 Added setImmediate to the tests instead of the code since this seems to be where the issue is. 2015-09-02 10:48:46 -04:00