@@ -44,7 +44,7 @@ func newTestTransaction(queueIndex uint64) *types.Transaction {
44
44
func TestReadWriteSkippedTransactionNoIndex (t * testing.T ) {
45
45
tx := newTestTransaction (123 )
46
46
db := NewMemoryDatabase ()
47
- writeSkippedTransaction (db , tx , "random reason" , 1 , & common.Hash {1 })
47
+ writeSkippedTransaction (db , tx , nil , "random reason" , 1 , & common.Hash {1 })
48
48
got := ReadSkippedTransaction (db , tx .Hash ())
49
49
if got == nil || got .Tx .Hash () != tx .Hash () || got .Reason != "random reason" || got .BlockNumber != 1 || got .BlockHash == nil || * got .BlockHash != (common.Hash {1 }) {
50
50
t .Fatal ("Skipped transaction mismatch" , "got" , got )
@@ -54,7 +54,7 @@ func TestReadWriteSkippedTransactionNoIndex(t *testing.T) {
54
54
func TestReadWriteSkippedTransaction (t * testing.T ) {
55
55
tx := newTestTransaction (123 )
56
56
db := NewMemoryDatabase ()
57
- WriteSkippedTransaction (db , tx , "random reason" , 1 , & common.Hash {1 })
57
+ WriteSkippedTransaction (db , tx , nil , "random reason" , 1 , & common.Hash {1 })
58
58
got := ReadSkippedTransaction (db , tx .Hash ())
59
59
if got == nil || got .Tx .Hash () != tx .Hash () || got .Reason != "random reason" || got .BlockNumber != 1 || got .BlockHash == nil || * got .BlockHash != (common.Hash {1 }) {
60
60
t .Fatal ("Skipped transaction mismatch" , "got" , got )
@@ -78,7 +78,7 @@ func TestSkippedTransactionConcurrentUpdate(t *testing.T) {
78
78
wg .Add (1 )
79
79
go func () {
80
80
defer wg .Done ()
81
- WriteSkippedTransaction (db , tx , "random reason" , 1 , & common.Hash {1 })
81
+ WriteSkippedTransaction (db , tx , nil , "random reason" , 1 , & common.Hash {1 })
82
82
}()
83
83
}
84
84
wg .Wait ()
@@ -100,12 +100,12 @@ func TestIterateSkippedTransactions(t *testing.T) {
100
100
}
101
101
102
102
for _ , tx := range txs {
103
- WriteSkippedTransaction (db , tx , "random reason" , 1 , & common.Hash {1 })
103
+ WriteSkippedTransaction (db , tx , nil , "random reason" , 1 , & common.Hash {1 })
104
104
}
105
105
106
106
// simulate skipped L2 tx that's not included in the index
107
107
l2tx := newTestTransaction (6 )
108
- writeSkippedTransaction (db , l2tx , "random reason" , 1 , & common.Hash {1 })
108
+ writeSkippedTransaction (db , l2tx , nil , "random reason" , 1 , & common.Hash {1 })
109
109
110
110
it := IterateSkippedTransactionsFrom (db , 2 )
111
111
defer it .Release ()
0 commit comments