func NewCoinSet(coins []Coin) *CoinSet {
	newCoinSet := &CoinSet{
		coinList:      list.New(),
		totalValue:    0,
		totalValueAge: 0,
	}
	for _, coin := range coins {
		newCoinSet.PushCoin(coin)
	}
	return newCoinSet
}
NewCoinSet creates a CoinSet containing the coins provided.
To create an empty CoinSet, you may pass null as the coins input parameter.
package coinset
import (
	"container/list"
	"errors"
	"sort"
	"github.com/soteria-dag/soterd/chaincfg/chainhash"
	"github.com/soteria-dag/soterd/wire"
	"github.com/soteria-dag/soterd/soterutil"
)
type Coin interface {
	Hash() *chainhash.Hash
	Index() uint32
	Value() soterutil.Amount
	PkScript() []byte
	NumConfs() int64
	ValueAge() int64
}
type Coins interface {
	Coins() []Coin
}
type CoinSet struct {
	coinList      *list.List
	totalValue    soterutil.Amount
	totalValueAge int64
}
var _ Coins = NewCoinSet(nil)