func (sn *Node) LiveTickets() []chainhash.Hash {
	tickets := make([]chainhash.Hash, sn.liveTickets.Len())
	i := 0
	sn.liveTickets.ForEach(func(k tickettreap.Key, v *tickettreap.Value) bool {
		tickets[i] = chainhash.Hash(k)
		i++
		return true
	})
	return tickets
}
LiveTickets returns the list of live tickets for this stake node.
package stake
import (
	"fmt"
	"github.com/HcashOrg/hcashd/blockchain/stake/internal/dbnamespace"
	"github.com/HcashOrg/hcashd/blockchain/stake/internal/ticketdb"
	"github.com/HcashOrg/hcashd/blockchain/stake/internal/tickettreap"
	"github.com/HcashOrg/hcashd/chaincfg"
	"github.com/HcashOrg/hcashd/chaincfg/chainhash"
	"github.com/HcashOrg/hcashd/database"
	"github.com/HcashOrg/hcashd/wire"
	"math/big"
)
type UndoTicketDataSlice []ticketdb.UndoTicketData
type Node struct {
	height uint32
	keyHeight uint32
	liveTickets *tickettreap.Immutable
	missedTickets *tickettreap.Immutable
	revokedTickets *tickettreap.Immutable
	databaseUndoUpdate UndoTicketDataSlice
	databaseBlockTickets ticketdb.TicketHashes
	nextWinners []chainhash.Hash
	finalState [6]byte
	params *chaincfg.Params
}
func (sn *Node) UndoData() UndoTicketDataSlice {
	return sn.databaseUndoUpdate
}
func (sn *Node) NewTickets() []chainhash.Hash {
	return sn.databaseBlockTickets
}
func (sn *Node) SpentByBlock() []chainhash.Hash {
	var spent []chainhash.Hash
	for _, undo := range sn.databaseUndoUpdate {
		if undo.Spent {
			spent = append(spent, undo.TicketHash)
		}
	}
	return spent
}
func (sn *Node) MissedByBlock() []chainhash.Hash {
	var missed []chainhash.Hash
	for _, undo := range sn.databaseUndoUpdate {
		if undo.Missed {
			missed = append(missed, undo.TicketHash)
		}
	}
	return missed
}
func (sn *Node) ExistsLiveTicket(ticket chainhash.Hash) bool {
	return sn.liveTickets.Has(tickettreap.Key(ticket))
}