aboutsummaryrefslogtreecommitdiffstats
path: root/light
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-01-31 00:39:32 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-01-31 00:42:00 +0800
commit566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2 (patch)
treed1b99b9caab92cce3f6a6a4f8dcafb66a892e13a /light
parent6198c53e28200b3a575f4545cbfa83c585e44b76 (diff)
downloadgo-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.tar
go-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.tar.gz
go-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.tar.bz2
go-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.tar.lz
go-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.tar.xz
go-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.tar.zst
go-tangerine-566d5c0777c2c5ee1a8fe3c0aee1e5c8c69053e2.zip
core, eth, les, light: get rid of redundant methods
Diffstat (limited to 'light')
-rw-r--r--light/lightchain.go21
1 files changed, 1 insertions, 20 deletions
diff --git a/light/lightchain.go b/light/lightchain.go
index 0d97ce1a2..f47957512 100644
--- a/light/lightchain.go
+++ b/light/lightchain.go
@@ -176,25 +176,6 @@ func (self *LightChain) GasLimit() uint64 {
return self.hc.CurrentHeader().GasLimit
}
-// LastBlockHash return the hash of the HEAD block.
-func (self *LightChain) LastBlockHash() common.Hash {
- self.mu.RLock()
- defer self.mu.RUnlock()
-
- return self.hc.CurrentHeader().Hash()
-}
-
-// Status returns status information about the current chain such as the HEAD Td,
-// the HEAD hash and the hash of the genesis block.
-func (self *LightChain) Status() (td *big.Int, currentBlock common.Hash, genesisBlock common.Hash) {
- self.mu.RLock()
- defer self.mu.RUnlock()
-
- header := self.hc.CurrentHeader()
- hash := header.Hash()
- return self.GetTd(hash, header.Number.Uint64()), hash, self.genesisBlock.Hash()
-}
-
// Reset purges the entire blockchain, restoring it to its genesis state.
func (bc *LightChain) Reset() {
bc.ResetWithGenesisBlock(bc.genesisBlock)
@@ -337,7 +318,7 @@ func (self *LightChain) postChainEvents(events []interface{}) {
for _, event := range events {
switch ev := event.(type) {
case core.ChainEvent:
- if self.LastBlockHash() == ev.Hash {
+ if self.CurrentHeader().Hash() == ev.Hash {
self.chainHeadFeed.Send(core.ChainHeadEvent{Block: ev.Block})
}
self.chainFeed.Send(ev)