WIP
[rust-lightning] / src / util / transaction_utils.rs
diff --git a/src/util/transaction_utils.rs b/src/util/transaction_utils.rs
deleted file mode 100644 (file)
index 8ecd78a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-use bitcoin::blockdata::transaction::TxOut;
-
-use std::cmp::Ordering;
-
-pub fn sort_outputs<T>(outputs: &mut Vec<(TxOut, T)>) { //TODO: Make static and put it in some utils somewhere (+inputs sorting)
-       outputs.sort_unstable_by(|a, b| {
-               if a.0.value < b.0.value {
-                       Ordering::Less
-               } else if b.0.value < a.0.value {
-                       Ordering::Greater
-               } else if a.0.script_pubkey[..] < b.0.script_pubkey[..] { //TODO: ordering of scripts shouldn't be len-based
-                       Ordering::Less
-               } else if b.0.script_pubkey[..] < a.0.script_pubkey[..] { //TODO: ordering of scripts shouldn't be len-based
-                       Ordering::Greater
-               } else {
-                       Ordering::Equal
-               }
-       });
-}