File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ use std::time::Duration;
33
44use mina_p2p_messages:: v2;
55use openmina_core:: constants:: PROTOCOL_VERSION ;
6- use openmina_core:: transaction:: { TransactionInfo , TransactionWithHash } ;
6+ use openmina_core:: transaction:: { Transaction , TransactionInfo , TransactionWithHash } ;
77use rand:: prelude:: * ;
88
99use openmina_core:: block:: BlockWithHash ;
@@ -534,7 +534,10 @@ impl P2p {
534534 on_p2p_channels_transaction_libp2p_received : Some ( redux:: callback!(
535535 on_p2p_channels_transaction_libp2p_received( transaction: Box <TransactionWithHash >) -> crate :: Action {
536536 TransactionPoolAction :: StartVerify {
537- commands: std:: iter:: once( * transaction) . collect( ) ,
537+ commands: std:: iter:: once( * transaction)
538+ // TODO(SEC): remove once proof verification is done outside state machine.
539+ . filter( |v| !matches!( v. body( ) , Transaction :: ZkappCommand ( _) ) )
540+ . collect( ) ,
538541 from_rpc: None
539542 }
540543 }
Original file line number Diff line number Diff line change @@ -78,9 +78,12 @@ impl redux::EnablingCondition<crate::State> for TransactionPoolAction {
7878 fn is_enabled ( & self , state : & crate :: State , time : redux:: Timestamp ) -> bool {
7979 match self {
8080 TransactionPoolAction :: Candidate ( a) => a. is_enabled ( state, time) ,
81- TransactionPoolAction :: StartVerify { commands, .. } => commands
82- . iter ( )
83- . any ( |cmd| !state. transaction_pool . contains ( cmd. hash ( ) ) ) ,
81+ TransactionPoolAction :: StartVerify { commands, .. } => {
82+ !commands. is_empty ( )
83+ && commands
84+ . iter ( )
85+ . any ( |cmd| !state. transaction_pool . contains ( cmd. hash ( ) ) )
86+ }
8487 TransactionPoolAction :: P2pSendAll => true ,
8588 TransactionPoolAction :: P2pSend { peer_id } => state
8689 . p2p
You can’t perform that action at this time.
0 commit comments