bitcoin/bitcoin — pull request #1386 by jgarzik (2012-05-24 03:39:38+00:00)
Title: JSON-RPC: add filter{clearall,clear,add}, a block and tx notification system

These RPCs manipulate a set of named lists, each of which matches zero or more bitcoin addresses.

If a match is found in the TX memory pool, the command specified by arg -filtertx (or -filter, if missing) is executed.

If a match is found in a newly [re-]accepted block (SetBestChain), the command specified by arg -filterblock (or -filter, if missing) is executed.

The following command string substituations are performed, before the notification command is executed:

%t "tx" or "block"
%h hex string of 256-bit block hash or tx hash