OSDN Git Service

V0.1 federation parse (#89)
[bytom/vapor.git] / mining / sort.go
1 package mining
2
3 import "github.com/vapor/protocol"
4
5 type byTime []*protocol.TxDesc
6
7 func (a byTime) Len() int           { return len(a) }
8 func (a byTime) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
9 func (a byTime) Less(i, j int) bool { return a[i].Added.Before(a[j].Added) }