ipld-eth-server/pkg/fakes/blockchain.go

23 lines
486 B
Go
Raw Normal View History

package fakes
2017-11-06 18:53:43 +00:00
import "github.com/8thlight/vulcanizedb/pkg/core"
type Blockchain struct {
outputBlocks chan core.Block
WasToldToStop bool
}
func (blockchain *Blockchain) SubscribeToBlocks(outputBlocks chan core.Block) {
blockchain.outputBlocks = outputBlocks
}
func (blockchain Blockchain) AddBlock(block core.Block) {
blockchain.outputBlocks <- block
}
2017-10-23 18:58:33 +00:00
func (*Blockchain) StartListening() {}
func (blockchain *Blockchain) StopListening() {
blockchain.WasToldToStop = true
}