Branch: refs/heads/master
  Commit: 77913ad2e8d62e8760aa66519eed3e2ec810da31
  Author: Dave Collins <>
  Date:   2016-10-13 (Thu, 13 Oct 2016)

  Changed paths:
    M blockchain/accept.go
    M blockchain/chain.go
    M blockchain/chain_test.go
    M blockchain/example_test.go
    M blockchain/process.go
    M blockchain/reorganization_test.go
    M blockmanager.go
    M cmd/addblock/import.go

  Log Message:
  blockchain: Expose main chain flag on ProcessBlock.

This modifies the blockchain.ProcessBlock function to return an
additional boolean as the first parameter which indicates whether or not
the block ended up on the main chain.

This is primarily useful for upcoming test code that needs to be able to
tell the difference between a block accepted to a side chain and a block
that either extends the main chain or causes a reorganize that causes it
to become the main chain.  However, it is also useful for the addblock
utility since it allows a better error in the case a file with out of
order blocks is provided.

Reply via email to