Branch: refs/heads/master
Home: https://github.com/conformal/btcchain
Commit: 415ac4596a109c288611195bce8be9bc0e50f355
https://github.com/conformal/btcchain/commit/415ac4596a109c288611195bce8be9bc0e50f355
Author: Dave Collins <[email protected]>
Date: 2014-06-25 (Wed, 25 Jun 2014)
Changed paths:
M chain_test.go
M doc.go
M notifications.go
M process.go
M reorganization_test.go
Log Message:
-----------
Make orphan ntfns to a return val on ProcessBlock.
This commit changes the way that orphan blocks are identified by adding a
new boolean return value on ProcessBlock and removing the notification for
NTOrphanBlock.
This allows the calling code to identify orphan blocks immediately instead
of having to setup a seperate callback handler and implementing some type
of state tracking. This, in turn, allows cleaner code for handling them.
In addition, the tests have been updated for the new function signature
and also now check that each block is or is not an orphan as expected
which makes the tests more robust.
ok @jrick