Only allow v2 shares to be mined on stratum server
This commit is contained in:
parent
fe5c673125
commit
f53e0b5dc0
|
@ -190,6 +190,10 @@ func (s *Server) fillNewTemplateData(currentDifficulty types.Difficulty) error {
|
|||
if s.newTemplateData.ShareVersion < sidechain.ShareVersion_V2 {
|
||||
return errors.New("unsupported sidechain version")
|
||||
}
|
||||
// no merge mining nor merkle proof support yet
|
||||
if s.newTemplateData.ShareVersion > sidechain.ShareVersion_V2 {
|
||||
return errors.New("unsupported sidechain version")
|
||||
}
|
||||
|
||||
if s.tip != nil {
|
||||
s.newTemplateData.PreviousTemplateId = s.tip.SideTemplateId(s.sidechain.Consensus())
|
||||
|
|
|
@ -216,7 +216,7 @@ func (tpl *Template) HashingBlob(hasher *sha3.HasherState, preAllocatedBuffer []
|
|||
}
|
||||
|
||||
func TemplateFromPoolBlock(b *sidechain.PoolBlock) (tpl *Template, err error) {
|
||||
if b.ShareVersion() != sidechain.ShareVersion_V2 {
|
||||
if b.ShareVersion() < sidechain.ShareVersion_V1 || b.ShareVersion() > sidechain.ShareVersion_V2 {
|
||||
return nil, errors.New("unsupported share version")
|
||||
}
|
||||
totalLen := b.BufferLength()
|
||||
|
|
Loading…
Reference in a new issue