aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/block_cache.go5
-rw-r--r--core/events.go4
2 files changed, 9 insertions, 0 deletions
diff --git a/core/block_cache.go b/core/block_cache.go
index 321021eb4..ea39e78e8 100644
--- a/core/block_cache.go
+++ b/core/block_cache.go
@@ -66,3 +66,8 @@ func (bc *BlockCache) Get(hash common.Hash) *types.Block {
return nil
}
+
+func (bc *BlockCache) Has(hash common.Hash) bool {
+ _, ok := bc.blocks[hash]
+ return ok
+}
diff --git a/core/events.go b/core/events.go
index 8c5fb592a..b93f27c51 100644
--- a/core/events.go
+++ b/core/events.go
@@ -38,6 +38,10 @@ type PendingBlockEvent struct {
Logs state.Logs
}
+type ChainUncleEvent struct {
+ Block *types.Block
+}
+
type ChainHeadEvent struct{ Block *types.Block }
// Mining operation events