aboutsummaryrefslogtreecommitdiff
path: root/coreth.go
diff options
context:
space:
mode:
Diffstat (limited to 'coreth.go')
-rw-r--r--coreth.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/coreth.go b/coreth.go
index b7e45af..baa82be 100644
--- a/coreth.go
+++ b/coreth.go
@@ -84,6 +84,16 @@ func (self *ETHChain) GenBlock() {
self.backend.Miner().GenBlock()
}
+func (self *ETHChain) VerifyBlock(block *types.Block) bool {
+ txnHash := types.DeriveSha(block.Transactions())
+ uncleHash := types.CalcUncleHash(block.Uncles())
+ ethHeader := block.Header()
+ if txnHash != ethHeader.TxHash || uncleHash != ethHeader.UncleHash {
+ return false
+ }
+ return true
+}
+
func (self *ETHChain) PendingSize() (int, error) {
pending, err := self.backend.TxPool().Pending()
count := 0