public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Matt Corallo <bitcoin-list@bluematt•me>
To: bitcoin-development@lists•sourceforge.net
Subject: Re: [Bitcoin-development] Adding callback hooks to the satoshi client
Date: Thu, 22 Mar 2012 01:24:11 -0400	[thread overview]
Message-ID: <1332393851.10496.11.camel@BMThinkPad.lan.bluematt.me> (raw)
In-Reply-To: <CABr1YTc0TOvfyFNY4CTaOiTa3WWb-5JHjQOTarB=8zZ+DqiUFg@mail.gmail.com>

I spent some time changing the internal bitcoin code to use callback
hooks, but its far from complete (or even really usable from anything
other than the code in the satoshi client itself, it doesnt even have
any deregister methods!).  As it sits now, it is likely to get more
eyeballs and merged for 0.7.  If you need additional specific callbacks,
adding them would be cool, though I wouldn't recommend relying on the
blockstore API to remain even remotely stable for the foreseeable
future.

https://github.com/bitcoin/bitcoin/pull/771

Matt

On Wed, 2012-03-21 at 22:13 -0700, Eric Lombrozo wrote:
> Hey, guys.
> 
> I've been writing a number of apps that require realtime event
> notifications, where the JSON-RPC API clearly doesn't suffice.
> 
> There are two approaches I've been taking to this end:
> 
> 1) Writing my own library for dealing with raw bitcoin structures and
> connecting to bitcoin nodes via the bitcoin protocol.
> 2) Making custom builds of the satoshi client putting callback hooks
> in key points.
> 
> Neither of these two approaches is ideal. (1) involves a lot of code
> duplication, (2) involves patching the satoshi client source
> each time I grab a later version, with the everpresent risk of
> something breaking and the need to continue maintaining these patches.
> Moreover, unfortunately many of these key points happen to be in files
> like main.cpp which see frequent changes.
> 
> I would like to propose adding these callback hooks to the main
> branch. I am willing to help locate these key points, reorganize the
> code
> to place these methods in separate source files, define a callback
> mechanism, and contribute source code.
> 
> -Eric Lombrozo




  reply	other threads:[~2012-03-22  5:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22  5:13 Eric Lombrozo
2012-03-22  5:24 ` Matt Corallo [this message]
2012-03-22  5:39 ` bitcoin-list
2012-03-22  9:56   ` Michael Grønager
2012-03-22 14:00 ` Luke-Jr
2012-03-22 15:23   ` Eric Lombrozo
2012-03-24  8:41     ` Eric Lombrozo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332393851.10496.11.camel@BMThinkPad.lan.bluematt.me \
    --to=bitcoin-list@bluematt$(echo .)me \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox