@@ -34,19 +34,22 @@ func TestTxsWriter_Flush(t *testing.T) {
3434
3535 txs := generator .GenerateN (3 )
3636
37- writer .Send (context .Background (), txs [0 ])
37+ err := writer .Send (context .Background (), txs [0 ])
38+ require .NoError (t , err )
3839 require .Equal (t , uint64 (1 ), writer .nextHeight )
3940 require .Equal (t , uint64 (21000 ), writer .bufferGas )
4041 require .Len (t , writer .txBuffer , 1 )
4142 require .Equal (t , txs [0 ], writer .txBuffer [0 ])
4243
43- writer .Send (context .Background (), txs [1 ])
44+ err = writer .Send (context .Background (), txs [1 ])
45+ require .NoError (t , err )
4446 require .Equal (t , uint64 (1 ), writer .nextHeight )
4547 require .Equal (t , uint64 (42000 ), writer .bufferGas )
4648 require .Len (t , writer .txBuffer , 2 )
4749 require .Equal (t , txs [1 ], writer .txBuffer [1 ])
4850
49- writer .Send (context .Background (), txs [2 ])
51+ err = writer .Send (context .Background (), txs [2 ])
52+ require .NoError (t , err )
5053 // now should be flushed and have the new tx
5154 require .Equal (t , uint64 (2 ), writer .nextHeight )
5255 require .Equal (t , uint64 (21000 ), writer .bufferGas )
0 commit comments