// ProposableIDs returns a slice of IDs of transactions that may be wrapped
// into a block that may be proposed to be finalized within the network.
ProposableIDs returns a slice of IDs of transactions that may be wrapped
into a block that may be proposed to be finalized within the network.
// ProposableIDs returns a slice of IDs of transactions that may be wrapped // into a block that may be proposed to be finalized within the network .
func (t *Transactions) ProposableIDs() []TransactionID {
	t.RLock()
	defer t.RUnlock()
	limit := int(conf.GetBlockTXLimit())
	if t.index.Len() < limit {
		limit = t.index.Len()
	}
	proposable := make([]TransactionID, 0, limit)
	t.index.Scan(func(key []byte, value interface{}) bool {
		id := value.(TransactionID)
		if t.buffer[id].Block <= t.latest.Index+1 {
			proposable = append(proposable, id)
		}
		return len(proposable) < limit
	})
	return proposable
}
func ( t * Transactions ) ProposableIDs ( ) [ ] TransactionID { t . RLock ( ) defer t . RUnlock ( ) limit := int ( conf . GetBlockTXLimit ( ) ) if t . index . Len ( ) < limit { limit = t . index . Len ( ) } proposable := make ( [ ] TransactionID , 0 , limit ) t . index . Scan ( func ( key [ ] byte , value interface { } ) bool { id := value . ( TransactionID ) if t . buffer [ id ] . Block <= t . latest . Index + 1 { proposable = append ( proposable , id ) } return len ( proposable ) < limit } ) return proposable }
ProposableIDs returns a slice of IDs of transactions that may be wrapped
into a block that may be proposed to be finalized within the network.
ProposableIDs returns a slice of IDs of transactions that may be wrapped into a block that may be proposed to be finalized within the network .