From 71dbf635d1afb4e63ad289a9481e215abca85210 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Wed, 10 Apr 2024 09:36:33 +0200 Subject: [PATCH] Remove unused GetPoolBlockByCoinbaseExtraIdentifier and BlockSeen check --- p2pool/sidechain/sidechain.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/p2pool/sidechain/sidechain.go b/p2pool/sidechain/sidechain.go index ae305ef..a96eb08 100644 --- a/p2pool/sidechain/sidechain.go +++ b/p2pool/sidechain/sidechain.go @@ -240,11 +240,6 @@ func (c *SideChain) BlockSeen(block *PoolBlock) bool { return true } - if block.ShareVersion() > ShareVersion_V2 { - // need to pre-fill to have working SideTemplateId - _, _ = c.PreprocessBlock(block) - } - fullId := block.FullId(c.Consensus()) c.seenBlocksLock.Lock() @@ -1187,17 +1182,6 @@ func (c *SideChain) getPoolBlockByMerkleRoot(id types.Hash) *PoolBlock { return b } -func (c *SideChain) GetPoolBlockByCoinbaseExtraIdentifier(version ShareVersion, id types.Hash) *PoolBlock { - if id == types.ZeroHash { - return nil - } - if version > ShareVersion_V2 { - return c.GetPoolBlockByMerkleRoot(id) - } else { - return c.GetPoolBlockByTemplateId(id) - } -} - func (c *SideChain) GetPoolBlocksByHeight(height uint64) []*PoolBlock { c.sidechainLock.RLock() defer c.sidechainLock.RUnlock()