aboutsummaryrefslogtreecommitdiffstats
path: root/core/types
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-04-22 21:29:19 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-04-23 05:16:19 +0800
commit4e0a2c8e8cf418528742500dff8e6916e4fd1bc5 (patch)
tree9f194fe587d93100dbb28bffa1a4100c2ada0b1e /core/types
parentec6acacc539c3392c8dd68c89a2b714ec609ff19 (diff)
downloadgo-tangerine-4e0a2c8e8cf418528742500dff8e6916e4fd1bc5.tar
go-tangerine-4e0a2c8e8cf418528742500dff8e6916e4fd1bc5.tar.gz
go-tangerine-4e0a2c8e8cf418528742500dff8e6916e4fd1bc5.tar.bz2
go-tangerine-4e0a2c8e8cf418528742500dff8e6916e4fd1bc5.tar.lz
go-tangerine-4e0a2c8e8cf418528742500dff8e6916e4fd1bc5.tar.xz
go-tangerine-4e0a2c8e8cf418528742500dff8e6916e4fd1bc5.tar.zst
go-tangerine-4e0a2c8e8cf418528742500dff8e6916e4fd1bc5.zip
Validate block header UncleHash against calculated hash
Diffstat (limited to 'core/types')
-rw-r--r--core/types/block.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/types/block.go b/core/types/block.go
index f9206ec76..fa83fc8e8 100644
--- a/core/types/block.go
+++ b/core/types/block.go
@@ -209,6 +209,10 @@ func (self *Block) Uncles() []*Header {
return self.uncles
}
+func (self *Block) CalculateUnclesHash() common.Hash {
+ return rlpHash(self.uncles)
+}
+
func (self *Block) SetUncles(uncleHeaders []*Header) {
self.uncles = uncleHeaders
self.header.UncleHash = rlpHash(uncleHeaders)