Remove unused GetPoolBlockByCoinbaseExtraIdentifier and BlockSeen check
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2024-04-10 09:36:33 +02:00
parent 0ec08e8aac
commit 71dbf635d1
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -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()