-// equal is a utility function used only in tests that determines if transactions are equal enough
-func (t Transaction) equal(otherT Transaction) bool {
- t.ID = []byte{0, 0, 0, 0}
- otherT.ID = []byte{0, 0, 0, 0}
-
- t.TotalSize = []byte{0, 0, 0, 0}
- otherT.TotalSize = []byte{0, 0, 0, 0}
-
- t.DataSize = []byte{0, 0, 0, 0}
- otherT.DataSize = []byte{0, 0, 0, 0}
+// tranAssertEqual compares equality of transactions slices after stripping out the random ID
+func tranAssertEqual(t *testing.T, tran1, tran2 []Transaction) bool {
+ var newT1 []Transaction
+ var newT2 []Transaction
+ for _, trans := range tran1 {
+ trans.ID = []byte{0, 0, 0, 0}
+ newT1 = append(newT1, trans)
+ }