dcrd/cmd
Dave Collins f13191ac48
blockchain: Decouple indexers from blockchain.
Some indexes require all of the previous output scripts referenced as
inputs by the blocks they are indexing.  Currently, the indexing code
relies on a concrete blockchain.UtxoViewpoint to provide that
information which makes the indexing code more rigid than it needs to be
and prevents the possibility of using other sources, such as the spend
journal, to provide the necessary scripts.

In addition, the index initialization code also currently requires
access to a concrete blockchain.BlockChain to query the current chain
state which also makes the code more rigid than it should ideally be.

Consequently, this modifies the indexing code to accept a PrevScripter
interface to remove the tight coupling to a specific type in the former
case, and introduces a new ChainQueryer interface to remove the tight
coupling in the latter case.

In order to fully remove the blockchain dependency from the indexers
package, this also moves the IndexManager interface from blockchain to
indexers and modifies it to use the new ChainQueryer interface in order
to provide the necessary information.

Finally, all code is updated to satisfy and use the interfaces.
2019-10-28 12:57:43 -05:00
..
addblock blockchain: Decouple indexers from blockchain. 2019-10-28 12:57:43 -05:00
dcrctl dcrutil: Start v3 module dev cycle. 2019-10-24 19:13:26 -05:00
findcheckpoint blockchain: Start v3 module dev cycle. 2019-10-24 21:15:06 -05:00
gencerts multi: Correct typos. 2019-08-22 10:20:03 -05:00
promptsecret promptsecret: Add -n flag to prompt multiple times 2019-03-28 10:24:53 -05:00