Rate float64
}
+type OrderSlice []*Order
+
+func (o OrderSlice) Len() int {
+ return len(o)
+}
+func (o OrderSlice) Swap(i, j int) {
+ o[i], o[j] = o[j], o[i]
+}
+func (o OrderSlice) Less(i, j int) bool {
+ return o[i].Rate < o[j].Rate
+}
+
func NewOrderFromOutput(tx *types.Tx, outputIndex int) (*Order, error) {
outputID := tx.OutputID(outputIndex)
output, err := tx.IntraChainOutput(*outputID)