diff --git a/p2pool/sidechain/poolblock.go b/p2pool/sidechain/poolblock.go index 4e89f2d..359ea0d 100644 --- a/p2pool/sidechain/poolblock.go +++ b/p2pool/sidechain/poolblock.go @@ -240,7 +240,7 @@ func NewShareFromExportedBytes(buf []byte, consensus *Consensus, cacheInterface b.CachedShareVersion = b.CalculateShareVersion(consensus) //TODO: this is to comply with non-standard p2pool serialization, see https://github.com/SChernykh/p2pool/issues/249 - if t := b.Main.Coinbase.Extra.GetTag(transaction.TxExtraTagMergeMining); t == nil && t.VarInt != 32 { + if t := b.Main.Coinbase.Extra.GetTag(transaction.TxExtraTagMergeMining); t == nil || t.VarInt != 32 { return nil, errors.New("wrong merge mining tag depth") } @@ -507,7 +507,7 @@ func (b *PoolBlock) FromReader(consensus *Consensus, derivationCache DerivationC } //TODO: this is to comply with non-standard p2pool serialization, see https://github.com/SChernykh/p2pool/issues/249 - if t := b.Main.Coinbase.Extra.GetTag(transaction.TxExtraTagMergeMining); t == nil && t.VarInt != 32 { + if t := b.Main.Coinbase.Extra.GetTag(transaction.TxExtraTagMergeMining); t == nil || t.VarInt != 32 { return errors.New("wrong merge mining tag depth") } @@ -533,7 +533,7 @@ func (b *PoolBlock) FromCompactReader(consensus *Consensus, derivationCache Deri } //TODO: this is to comply with non-standard p2pool serialization, see https://github.com/SChernykh/p2pool/issues/249 - if t := b.Main.Coinbase.Extra.GetTag(transaction.TxExtraTagMergeMining); t == nil && t.VarInt != 32 { + if t := b.Main.Coinbase.Extra.GetTag(transaction.TxExtraTagMergeMining); t == nil || t.VarInt != 32 { return errors.New("wrong merge mining tag depth") }