@@ -109,7 +109,7 @@ void shouldAddInitiatedRequestingTransactions() {
109109
110110 messageHandler .processNewPooledTransactionHashesMessage (
111111 peer1 ,
112- NewPooledTransactionHashesMessage .create (transactionList , EthProtocol .ETH66 ),
112+ NewPooledTransactionHashesMessage .create (transactionList , EthProtocol .LATEST ),
113113 now (),
114114 ofMinutes (1 ));
115115
@@ -127,7 +127,7 @@ void shouldNotAddAlreadyPresentTransactions() {
127127
128128 messageHandler .processNewPooledTransactionHashesMessage (
129129 peer1 ,
130- NewPooledTransactionHashesMessage .create (transactionList , EthProtocol .ETH66 ),
130+ NewPooledTransactionHashesMessage .create (transactionList , EthProtocol .LATEST ),
131131 now (),
132132 ofMinutes (1 ));
133133
@@ -142,7 +142,7 @@ void shouldAddInitiatedRequestingTransactionsWhenOutOfSync() {
142142
143143 messageHandler .processNewPooledTransactionHashesMessage (
144144 peer1 ,
145- NewPooledTransactionHashesMessage .create (transactionList , EthProtocol .ETH66 ),
145+ NewPooledTransactionHashesMessage .create (transactionList , EthProtocol .LATEST ),
146146 now (),
147147 ofMinutes (1 ));
148148 verify (transactionPool , times (3 )).getTransactionByHash (any ());
@@ -152,7 +152,7 @@ void shouldAddInitiatedRequestingTransactionsWhenOutOfSync() {
152152 void shouldNotMarkReceivedExpiredTransactionsAsSeen () {
153153 messageHandler .processNewPooledTransactionHashesMessage (
154154 peer1 ,
155- NewPooledTransactionHashesMessage .create (transactionList , EthProtocol .ETH66 ),
155+ NewPooledTransactionHashesMessage .create (transactionList , EthProtocol .LATEST ),
156156 now ().minus (ofMinutes (1 )),
157157 ofMillis (1 ));
158158 verifyNoInteractions (transactionTracker );
@@ -167,7 +167,7 @@ void shouldNotMarkReceivedExpiredTransactionsAsSeen() {
167167 void shouldNotAddReceivedTransactionsToTransactionPoolIfExpired () {
168168 messageHandler .processNewPooledTransactionHashesMessage (
169169 peer1 ,
170- NewPooledTransactionHashesMessage .create (transactionList , EthProtocol .ETH66 ),
170+ NewPooledTransactionHashesMessage .create (transactionList , EthProtocol .LATEST ),
171171 now ().minus (ofMinutes (1 )),
172172 ofMillis (1 ));
173173 verifyNoInteractions (transactionPool );
@@ -187,7 +187,7 @@ void shouldScheduleGetPooledTransactionsTaskWhenNewTransactionAddedFromPeerForTh
187187 messageHandler .processNewPooledTransactionHashesMessage (
188188 peer1 ,
189189 NewPooledTransactionHashesMessage .create (
190- List .of (transaction1 , transaction2 ), EthProtocol .ETH66 ),
190+ List .of (transaction1 , transaction2 ), EthProtocol .LATEST ),
191191 now (),
192192 ofMinutes (1 ));
193193
@@ -202,14 +202,14 @@ void shouldNotScheduleGetPooledTransactionsTaskTwice() {
202202 messageHandler .processNewPooledTransactionHashesMessage (
203203 peer1 ,
204204 NewPooledTransactionHashesMessage .create (
205- Collections .singletonList (transaction1 ), EthProtocol .ETH66 ),
205+ Collections .singletonList (transaction1 ), EthProtocol .LATEST ),
206206 now (),
207207 ofMinutes (1 ));
208208
209209 messageHandler .processNewPooledTransactionHashesMessage (
210210 peer1 ,
211211 NewPooledTransactionHashesMessage .create (
212- Collections .singletonList (transaction2 ), EthProtocol .ETH66 ),
212+ Collections .singletonList (transaction2 ), EthProtocol .LATEST ),
213213 now (),
214214 ofMinutes (1 ));
215215
@@ -218,32 +218,6 @@ void shouldNotScheduleGetPooledTransactionsTaskTwice() {
218218 any (FetcherCreatorTask .class ), any (Duration .class ), any (Duration .class ));
219219 }
220220
221- @ Test
222- void shouldCreateAndDecodeForEth66 () {
223-
224- final List <TransactionAnnouncement > expectedAnnouncementList =
225- transactionList .stream ().map (TransactionAnnouncement ::new ).toList ();
226-
227- final NewPooledTransactionHashesMessage message =
228- NewPooledTransactionHashesMessage .create (transactionList , EthProtocol .ETH66 );
229-
230- // for eth/66 the message should not contain size or type
231- message
232- .pendingTransactions ()
233- .forEach (
234- t -> {
235- assertThat (t .getSize ()).isEmpty ();
236- assertThat (t .getType ()).isEmpty ();
237- });
238-
239- // assert all transaction hashes are the same as announcement message
240- assertThat (message .pendingTransactionHashes ())
241- .containsExactlyElementsOf (
242- expectedAnnouncementList .stream ()
243- .map (TransactionAnnouncement ::getHash )
244- .collect (Collectors .toList ()));
245- }
246-
247221 @ Test
248222 void shouldCreateAndDecodeForEth68 () {
249223 final List <TransactionAnnouncement > expectedTransactions =
@@ -256,24 +230,6 @@ void shouldCreateAndDecodeForEth68() {
256230 assertThat (announcementList ).containsExactlyElementsOf (expectedTransactions );
257231 }
258232
259- @ Test
260- void shouldThrowRLPExceptionIfIncorrectVersion () {
261-
262- // message for Eth/68 with 66 data should throw RLPException
263- final NewPooledTransactionHashesMessage message66 =
264- new NewPooledTransactionHashesMessage (
265- getEncoder (EthProtocol .ETH68 ).encode (transactionList ), EthProtocol .ETH66 );
266- // assert RLPException
267- assertThatThrownBy (message66 ::pendingTransactions ).isInstanceOf (RLPException .class );
268-
269- // message for Eth/66 with 68 data should throw RLPException
270- final NewPooledTransactionHashesMessage message68 =
271- new NewPooledTransactionHashesMessage (
272- getEncoder (EthProtocol .ETH68 ).encode (transactionList ), EthProtocol .ETH66 );
273- // assert RLPException
274- assertThatThrownBy (message68 ::pendingTransactions ).isInstanceOf (RLPException .class );
275- }
276-
277233 @ Test
278234 void shouldEncodeTransactionsCorrectly_Eth68 () {
279235
@@ -383,25 +339,6 @@ void shouldDecodeBytesCorrectly_PreviousImplementations_Eth68() {
383339 assertThat (eip1559 .getSize ()).hasValue (3L );
384340 }
385341
386- @ Test
387- void shouldEncodeAndDecodeTransactionAnnouncement_Eth66 () {
388- final Transaction t1 = generator .transaction (TransactionType .FRONTIER );
389- final Transaction t2 = generator .transaction (TransactionType .ACCESS_LIST );
390- final Transaction t3 = generator .transaction (TransactionType .EIP1559 );
391- final List <Transaction > list = List .of (t1 , t2 , t3 );
392- final Bytes bytes = getEncoder (EthProtocol .ETH66 ).encode (list );
393-
394- final List <TransactionAnnouncement > announcementList =
395- getDecoder (EthProtocol .ETH66 ).decode (RLP .input (bytes ));
396-
397- for (int i = 0 ; i < announcementList .size (); i ++) {
398- final TransactionAnnouncement announcement = announcementList .get (i );
399- assertThat (announcement .getHash ()).isEqualTo (list .get (i ).getHash ());
400- assertThat (announcement .getType ()).isEmpty ();
401- assertThat (announcement .getType ()).isEmpty ();
402- }
403- }
404-
405342 @ Test
406343 void shouldEncodeAndDecodeTransactionAnnouncement_Eth68 () {
407344 final Transaction t1 = generator .transaction (TransactionType .FRONTIER );
0 commit comments