[Bitcoin-development] Speeding up "getbalance <account>" calls

jan at uos.de jan at uos.de
Mon Jul 4 11:40:28 UTC 2011


Another quick update:

On Sun, Jul 03, 2011 at 06:29:05PM +0200, Jan Vornberger wrote:
> as now "sendfrom" starts acting up and I have to look into that
> next.

I realized why this happens: Sendfrom triggers a rebuild of the cache
and couldn't return before the rebuild was complete.

So I changed the approach slightly: A complete rebuild of the cache will
only happen on new blocks (in case reorgs happen) whereas on new wallet
transactions the cache will just be adjusted incrementally. Seems to
work fine so far (every 4000 calls or so I double check the cache by
running a full calculation and compare the results. No mismatch happened
so far). The changes are pushed to the github branch I linked to.

One caveat I realized: The cache will not work correctly with the RPC
command "move" as I haven't implemented the necessary adjustments.
Shouldn't be too difficult, but since I don't use that command, I
haven't done this (yet).

Regards!
Jan




More information about the bitcoin-dev mailing list