File tree 1 file changed +10
-14
lines changed
1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ mod watcher;
8
8
mod tests;
9
9
10
10
use crate :: bench:: { LiveCellProducer , TransactionProducer } ;
11
- use crate :: prepare:: { collect, dispatch , derive_privkeys } ;
11
+ use crate :: prepare:: { collect, derive_privkeys , dispatch } ;
12
12
use crate :: utils:: maybe_retry_send_transaction;
13
13
use crate :: watcher:: Watcher ;
14
14
use ckb_crypto:: secp:: Privkey ;
@@ -317,19 +317,15 @@ pub fn entrypoint(clap_arg_match: ArgMatches<'static>) {
317
317
sleep ( t_tx_interval) ;
318
318
}
319
319
320
- loop {
321
- i = ( i + 1 ) % nodes. len ( ) ;
322
- match maybe_retry_send_transaction ( & nodes[ i] , & tx) {
323
- Ok ( _hash) => {
324
- benched_transactions += 1 ;
325
- break ;
326
- }
327
- Err ( err) => {
328
- ckb_testkit:: error!(
329
- "failed to send tx {:#x}, error: {}" ,
330
- tx. hash( ) ,
331
- err
332
- ) ;
320
+ i = ( i + 1 ) % nodes. len ( ) ;
321
+ match maybe_retry_send_transaction ( & nodes[ i] , & tx) {
322
+ Ok ( _hash) => {
323
+ benched_transactions += 1 ;
324
+ }
325
+ Err ( err) => {
326
+ // double spending, discard this transaction
327
+ if !err. contains ( "TransactionFailedToResolve" ) {
328
+ ckb_testkit:: error!( "failed to send tx {:#x}, error: {}" , tx. hash( ) , err) ;
333
329
}
334
330
}
335
331
}
You can’t perform that action at this time.
0 commit comments