Branch: refs/heads/master
Home: https://github.com/btcsuite/btcd
Commit: 00ebb9d14d7b6bcd3713e00e63b2b967bf19707c
https://github.com/btcsuite/btcd/commit/00ebb9d14d7b6bcd3713e00e63b2b967bf19707c
Author: Dave Collins <[email protected]>
Date: 2016-07-14 (Thu, 14 Jul 2016)
Changed paths:
M blockchain/chain.go
M blockchain/chain_test.go
M blockchain/common_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: Associate time src with chain instance.
Rather than making the caller to pass in the median time source on
ProcessBlock and IsCurrent, modify the Config struct to include the
median time source and associate it with the chain instance when it is
created.
This is being done because both the ProcessBlock and IsCurrent functions
require access to the blockchain state already, it is a little bit safer
to ensure the time source matches the chain instance state, it
simplifies the caller logic, and it also allows its use within the logic
of the blockchain package itself which will be required by upcoming
rule change warning logic that is part of BIP9.