remove event-based code for now.

This commit is contained in:
Christopher Jeffrey 2014-09-19 17:49:51 -07:00
parent dcb068d3b5
commit e88f535815
2 changed files with 0 additions and 62 deletions

View File

@ -42,22 +42,6 @@
'-fexceptions',
'-frtti',
],
#'direct_dependent_settings': {
# 'linkflags': [
# '--wrap=AcceptBlock',
# ],
# 'ldflags': [
# '--wrap=AcceptBlock',
# ],
#},
# 'export_dependent_settings': {
# 'linkflags': [
# '--wrap=AcceptBlock',
# ],
# },
#'ldflags': [
# '--wrap=AcceptBlock',
#],
'libraries': [
# standard libs:
# '-L/usr/lib',

View File

@ -177,26 +177,10 @@ async_get_block(uv_work_t *req);
static void
async_get_block_after(uv_work_t *req);
static void
poll_blocks(void);
extern "C" void
init(Handle<Object>);
static volatile bool shutdownComplete = false;
static volatile CBlockIndex *lastindex = NULL;
// bool (*AcceptBlock_original)(CBlock& block, CValidationState& state, CDiskBlockPos* dbp) = &AcceptBlock;
// bool AcceptBlock(CBlock& block, CValidationState& state, CDiskBlockPos* dbp) {
// printf("AcceptBlock called\n");
// return AcceptBlock_original(block, state, dbp);
// }
// bool __real_AcceptBlock(CBlock& block, CValidationState& state, CDiskBlockPos* dbp);
// bool __wrap_AcceptBlock(CBlock& block, CValidationState& state, CDiskBlockPos* dbp) {
// printf("AcceptBlock called\n");
// return __real_AcceptBlock(block, state, dbp);
// }
/**
* async_block_data
@ -389,8 +373,6 @@ start_node(void) {
(boost::thread *)new boost::thread(boost::bind(&start_node_thread));
// (boost::thread *)new boost::thread(boost::bind(&poll_blocks));
// horrible fix for a race condition
sleep(2);
signal(SIGINT, SIG_DFL);
@ -888,34 +870,6 @@ async_get_block_after(uv_work_t *req) {
delete req;
}
static void
poll_blocks(void) {
if (!lastindex) {
lastindex = chainActive.Tip();
}
CBlockIndex *pnext = chainActive.Next((const CBlockIndex *)lastindex);
CBlockIndex *pcur = pnext;
if (pnext) {
// execute callback
printf("Found block\n");
while ((pcur = chainActive.Next(pcur))) {
// execute callback
printf("Found block\n");
pnext = pcur;
}
}
if (pnext) {
lastindex = pnext;
}
sleep(1);
}
// Use mapBlockIndex.find
// mapBlockIndex.end
// mapBlockIndex.next?
// CBlockIndex* pblockindex = mapBlockIndex[block.nextblockhash];
// mapBlockIndex.find(block.nextblockhash);
/**
* Init
*/