diff --git a/p2pool/stratum/server.go b/p2pool/stratum/server.go index dbc436c..02afd47 100644 --- a/p2pool/stratum/server.go +++ b/p2pool/stratum/server.go @@ -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()) diff --git a/p2pool/stratum/template.go b/p2pool/stratum/template.go index 5cd2733..36c8502 100644 --- a/p2pool/stratum/template.go +++ b/p2pool/stratum/template.go @@ -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()