forked from cerc-io/ipld-eth-server
Nest packages under pkg
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package observers
|
||||
|
||||
import (
|
||||
"github.com/8thlight/vulcanizedb/pkg/core"
|
||||
"github.com/8thlight/vulcanizedb/pkg/repositories"
|
||||
)
|
||||
|
||||
type BlockchainDbObserver struct {
|
||||
repository repositories.Repository
|
||||
}
|
||||
|
||||
func NewBlockchainDbObserver(repository repositories.Repository) BlockchainDbObserver {
|
||||
return BlockchainDbObserver{repository: repository}
|
||||
}
|
||||
|
||||
func (observer BlockchainDbObserver) NotifyBlockAdded(block core.Block) {
|
||||
observer.repository.CreateBlock(block)
|
||||
}
|
||||
Reference in New Issue
Block a user