646e0fa057
* This removes some duplication between the fake blockchain and geth blockchain. * This pulls the observers into the blockchain listener
18 lines
377 B
Go
18 lines
377 B
Go
package fakes
|
|
|
|
import "github.com/8thlight/vulcanizedb/core"
|
|
|
|
type Blockchain struct {
|
|
outputBlocks chan core.Block
|
|
}
|
|
|
|
func (blockchain *Blockchain) SubscribeToBlocks(outputBlocks chan core.Block) {
|
|
blockchain.outputBlocks = outputBlocks
|
|
}
|
|
|
|
func (blockchain Blockchain) AddBlock(block core.Block) {
|
|
blockchain.outputBlocks <- block
|
|
}
|
|
|
|
func (*Blockchain) StartListening() {}
|