Commit Graph

547 Commits

Author SHA1 Message Date
Chris Kleeschulte
f4a1f7b12a Removed signal handlers from bitcoind.
- when using bitcoin as a shared lib, there should not be any need for bitcoind to be handling its own signals.
2015-08-24 13:29:42 -04:00
Patrick Nagurny
b0ab45f3f7 handle signals and stop correctly 2015-08-24 13:29:42 -04:00
Patrick Nagurny
164a2cad75 cleanup daemon 2015-08-24 13:29:42 -04:00
Braydon Fuller
a65a097e8a Merge pull request #134 from kleetus/regtest_ready_event
Regtest and wallet ready event
2015-08-21 15:00:54 -04:00
Chris Kleeschulte
c4ee586bd7 Added CFLAGS for the bindings so that they know that the wallet is compiled in. 2015-08-19 16:33:01 -04:00
Chris Kleeschulte
862d36191b Corrected the preprocessor directive. 2015-08-19 11:01:48 -04:00
Chris Kleeschulte
a68e51ffc4 Regtest and wallet ready event
- Added a check for the wallet availability during onBlocksReady
- Fixed a problem with spaces being added at the end of the file by git diff
2015-08-18 17:56:35 -04:00
Patrick Nagurny
78bc054bfa changes for BWS integration 2015-08-14 11:15:07 -04:00
Patrick Nagurny
223aebf98c Merge pull request #117 from kleetus/blockchain_synced
GetProgress, will report the GuessVerificationProgress for the blockchain
2015-08-12 15:32:09 -04:00
Chris Kleeschulte
8115d92de9 Removed verifyScript and related methods that we don't currently use. 2015-08-12 12:38:33 -04:00
Braydon Fuller
ffddc9d9b5 Fix declarations for IsSynced and SyncPercentage 2015-08-11 17:58:25 -04:00
Braydon Fuller
6584974413 Emit "synced" event when bitcoind is synced
- Added daemon IsSynced method
- Renamed GetProgress to SyncPercentage
- Improved logging when syncing is finished
2015-08-11 17:24:30 -04:00
Chris Kleeschulte
f2c6d310ae GetProgress
- uses the same routine as the log reporter in bitcoin
- essentially divides the chainParams checkpoints by the current tip
2015-08-11 12:31:54 -04:00
Braydon Fuller
682f3999ec Fix bug with transaction message processing
- Copy the message so that the message can be later processed
- Connect at the front to be able to scan but not seek
- Emit event after process message and accept to mempool
- Include node buffer, hash and mempool status of the transaction in result
2015-08-07 11:05:04 -04:00
Braydon Fuller
a952c3e417 Added regtests for getTransaction 2015-08-03 17:41:11 -04:00
Braydon Fuller
286f917dd0 Fix "Abort trap 6" bug
- Added CCriticalSection LOCK
- Removed the use of uv_mutex_lock
2015-08-03 16:10:58 -04:00
Braydon Fuller
f4061037b6 Update name to Bitcore Node 2015-07-31 13:26:48 -04:00
Patrick Nagurny
4a4e71797a getTransactionWithBlockInfo 2015-07-31 11:13:33 -04:00
Braydon Fuller
49587b7e2d Process tx messages
- Check for tx command when processing messages
- Emit tx events from the daemon
- Start the txmon when the daemon starts
2015-07-30 20:26:08 -04:00
Braydon Fuller
6f56df0c6f Added p2p message signal bindings. 2015-07-30 18:05:03 -04:00
Braydon Fuller
2ca3a48884 Expose estimateFee method. 2015-07-28 16:03:55 -04:00
Braydon Fuller
93ed8bfd8d Fix bug with feedback loop during shutdown
- Use height to indicate tip change by comparing heights
- Give undefined for callback when shutting down
2015-07-24 12:32:28 -04:00
Braydon Fuller
4189e3548a Tests for tip_update
- Exit tip_update thread on shutdown
- Check that the tip update event is fired
2015-07-23 23:29:01 -04:00
Braydon Fuller
9eda30ae2b Handle forks with bitcoindSync
- added bindings to listen for tip updates from the daemon
- update the height during syncing for continuity
- call sync when there is a new tip
- added ability to rewind to a ancestor when there is a fork
2015-07-23 20:06:19 -04:00
Braydon Fuller
7b8268d0e0 Use prevHash from bitcoind block index
- Changed method getChainWork into getBlockIndex
- Added prevHash to getBlockIndex result
2015-07-22 16:56:17 -04:00
Braydon Fuller
2312e53038 Fix compilation of bindings for SendTransaction. 2015-07-22 10:57:01 -04:00
Braydon Fuller
796d7682f8 Add sendTransaction method to the daemon. 2015-07-22 10:57:01 -04:00
Chris Kleeschulte
cf6225c495 Regtest testing
- Removed config option for build scripts, replaced with env variable
- Updated README
- Added regtest option under test build, wallet built-in
- added network key to bindings
- datadir for the bitcoind object instead of directory
- added new config_options scripts for test and debug
2015-07-21 13:06:43 -04:00
Braydon Fuller
162088f8f4 Expose verifyScript from the daemon 2015-07-20 10:40:35 -06:00
Braydon Fuller
0fbca8094e Added comments to getMempoolOutputs 2015-07-20 09:47:53 -04:00
Braydon Fuller
0b926b67b6 Completed getMempoolOutputs
- Pass ctx to data from the mempool for getTransaction
- Use string as input for unchecked transaction to mempool
- Only include outputs that match input address
- Include script in results
2015-07-20 09:47:53 -04:00
Chris Kleeschulte
ef3abbcb6c Added a binding for Add to mempool. 2015-07-20 09:47:07 -04:00
Braydon Fuller
54edc851e0 Add getMempoolOutputs method. 2015-07-20 09:45:54 -04:00
Braydon Fuller
b2b44d1674 Added getChainWork method for determining the best chain. 2015-07-17 13:36:12 -04:00
Braydon Fuller
8c8aa7dba2 Wait to be able to query transactions from the mempool. 2015-07-16 16:41:11 -04:00
Braydon Fuller
b738a5fb84 Remove braces, fix benchmark and pass callback. 2015-07-16 16:09:30 -04:00
Braydon Fuller
9020ddb85c Add queryMempool option to getTransaction 2015-07-16 14:39:15 -04:00
Chris Kleeschulte
0601ed29d9 1. Added a way to check if the genesis block is ready in chainActive before sending the ready event. We think that once chainActive[0] is not returning NULL, we should be ready to query the local blockchain.
2. Added the env variable BITCOINDJS_DIR support in the integration tests.
2015-07-16 13:43:51 -04:00
Chris Kleeschulte
f999e7e30f Merge pull request #28 from braydonf/isspent
Add method to check if an outpoint is spent.
2015-07-16 11:02:41 -04:00
Braydon Fuller
dcaa6203e9 Add additional livenet tests and remove used param. 2015-07-16 10:02:27 -04:00
Chris Kleeschulte
1c615ac7c0 Added extern mempool and fixed method name. 2015-07-16 10:01:41 -04:00
Braydon Fuller
801679df75 Add isSpent call 2015-07-16 10:01:41 -04:00
Braydon Fuller
946feba862 Handle case that chainActive at height does not exist. 2015-07-16 09:59:13 -04:00
Braydon Fuller
be3044d3d3 Add tests and benchmarks for getTransaction 2015-07-15 16:00:48 -04:00
Braydon Fuller
e1568d5738 Changed types back to std::string for getBlock hash. 2015-07-14 15:54:43 -04:00
k
36e3343432 Changed the order in which the header files were being included. Due to the nan header using the system version of endian.h, but the bitcoin-related headers need the compat/endian.h. The two (at least on Linux) are not compatible. 2015-07-14 15:54:39 -04:00
Chris Kleeschulte
5d9338d22a 1. Updated patch for v0.11.0
2. Updated bindings to cover the changes to bitcoin
3. Added some file matchers to gitignore for Qt Creator
4. Fixed platform lib path for Mac OS X
5. Removed unneeded methods in bindings (they will be re-added later
2015-07-13 16:34:29 -04:00
Braydon Fuller
91004a24a9 Free block buffer memory. 2015-07-09 17:34:37 -04:00
Braydon Fuller
24e705b265 Get blocks by height. 2015-07-09 16:45:30 -04:00
Braydon Fuller
69ed6efcb2 Allocate memory for block buffer. 2015-07-09 16:16:38 -04:00