func (atxh *ActivationTxHeader) TargetEpoch() EpochID {
	return atxh.PubLayerID.GetEpoch() + 1
}
TargetEpoch returns the target epoch of the activation transaction. This is the epoch in which the miner is eligible
to participate thanks to the ATX.
package types
import (
	"bytes"
	"encoding/hex"
	"fmt"
	"sort"
	"strconv"
	poetShared "github.com/spacemeshos/poet/shared"
	postShared "github.com/spacemeshos/post/shared"
	"github.com/spacemeshos/sha256-simd"
	"github.com/spacemeshos/go-spacemesh/common/util"
	"github.com/spacemeshos/go-spacemesh/log"
)
type EpochID uint32
func (l EpochID) ToBytes() []byte { return util.Uint32ToBytes(uint32(l)) }
func (l EpochID) IsGenesis() bool {
	return l < 2
}
func (l EpochID) NeedsGoldenPositioningATX() bool {
	return l == 1
}
func (l EpochID) FirstLayer() LayerID {
	return NewLayerID(uint32(l)).Mul(getLayersPerEpoch())
}
func (l EpochID) Field() log.Field { return log.Uint32("epoch_id", uint32(l)) }
func (l EpochID) String() string {
	return strconv.FormatUint(uint64(l), 10)
}
type ATXID Hash32
func (t ATXID) ShortString() string {
	return t.Hash32().ShortString()
}
func (t ATXID) Hash32() Hash32 {
	return Hash32(t)
}
func (t ATXID) Bytes() []byte {
	return Hash32(t).Bytes()
}
func (t ATXID) Field() log.Field { return log.FieldNamed("atx_id", t.Hash32()) }
func (t ATXID) Compare(other ATXID) bool {
	return bytes.Compare(t.Bytes(), other.Bytes()) < 0
}
var EmptyATXID = &ATXID{}
type ActivationTxHeader struct {
	NIPostChallenge
	id       *ATXID  
	Coinbase Address
	NumUnits uint
}
func (atxh *ActivationTxHeader) ShortString() string {
	return atxh.ID().ShortString()
}
func (atxh *ActivationTxHeader) Hash32() Hash32 {
	return atxh.ID().Hash32()
}
func (atxh *ActivationTxHeader) ID() ATXID {
	if atxh.id == nil {
		panic("id field must be set")
	}
	return *atxh.id
}