ipld-eth-server/fakes/blockchain.go
Matt Krump 571bc7f63a Add integration test
* Update Travis to run integration tests
2017-10-24 15:36:50 -05:00

22 lines
474 B
Go

package fakes
import (
"github.com/8thlight/vulcanizedb/core"
)
type Blockchain struct {
observers []core.BlockchainObserver
}
func (blockchain *Blockchain) RegisterObserver(observer core.BlockchainObserver) {
blockchain.observers = append(blockchain.observers, observer)
}
func (blockchain *Blockchain) AddBlock(block core.Block) {
for _, observer := range blockchain.observers {
observer.NotifyBlockAdded(block)
}
}
func (_ *Blockchain) SubscribeToEvents() {}