diff --git a/wtxmgr/kahnsort.go b/wtxmgr/kahnsort.go index 1225e4a..efb85ac 100644 --- a/wtxmgr/kahnsort.go +++ b/wtxmgr/kahnsort.go @@ -83,9 +83,9 @@ func graphRoots(graph hashGraph) []*wire.MsgTx { return roots } -// dependencySort topologically sorts a set of transactions by their dependency +// DependencySort topologically sorts a set of transactions by their dependency // order. It is implemented using Kahn's algorithm. -func dependencySort(txs map[chainhash.Hash]*wire.MsgTx) []*wire.MsgTx { +func DependencySort(txs map[chainhash.Hash]*wire.MsgTx) []*wire.MsgTx { graph := makeGraph(txs) s := graphRoots(graph) diff --git a/wtxmgr/unconfirmed.go b/wtxmgr/unconfirmed.go index 3e76387..0f171e7 100644 --- a/wtxmgr/unconfirmed.go +++ b/wtxmgr/unconfirmed.go @@ -169,7 +169,7 @@ func (s *Store) UnminedTxs(ns walletdb.ReadBucket) ([]*wire.MsgTx, error) { txSet[txHash] = &txRec.MsgTx } - return dependencySort(txSet), nil + return DependencySort(txSet), nil } func (s *Store) unminedTxRecords(ns walletdb.ReadBucket) (map[chainhash.Hash]*TxRecord, error) {