@@ -23,6 +23,7 @@ use crate::external_snark_worker::ExternalSnarkWorkerAction;
23
23
use crate :: ledger:: read:: LedgerReadAction ;
24
24
use crate :: ledger:: write:: LedgerWriteAction ;
25
25
use crate :: ledger:: LedgerAction ;
26
+ use crate :: p2p:: callbacks:: P2pCallbacksAction ;
26
27
use crate :: p2p:: channels:: best_tip:: P2pChannelsBestTipAction ;
27
28
use crate :: p2p:: channels:: best_tip_effectful:: P2pChannelsBestTipEffectfulAction ;
28
29
use crate :: p2p:: channels:: rpc:: P2pChannelsRpcAction ;
@@ -147,6 +148,7 @@ pub enum ActionKind {
147
148
ConsensusBlockSnarkVerifySuccess ,
148
149
ConsensusDetectForkRange ,
149
150
ConsensusLongRangeForkResolve ,
151
+ ConsensusP2pBestTipUpdate ,
150
152
ConsensusPrune ,
151
153
ConsensusShortRangeForkResolve ,
152
154
EventSourceNewEvent ,
@@ -174,6 +176,13 @@ pub enum ActionKind {
174
176
LedgerWriteInit ,
175
177
LedgerWritePending ,
176
178
LedgerWriteSuccess ,
179
+ P2pCallbacksP2pChannelsRpcReady ,
180
+ P2pCallbacksP2pChannelsRpcRequestReceived ,
181
+ P2pCallbacksP2pChannelsRpcResponseReceived ,
182
+ P2pCallbacksP2pChannelsRpcTimeout ,
183
+ P2pCallbacksP2pChannelsStreamingRpcReady ,
184
+ P2pCallbacksP2pChannelsStreamingRpcResponseReceived ,
185
+ P2pCallbacksP2pChannelsStreamingRpcTimeout ,
177
186
P2pChannelsBestTipInit ,
178
187
P2pChannelsBestTipPending ,
179
188
P2pChannelsBestTipReady ,
@@ -427,6 +436,7 @@ pub enum ActionKind {
427
436
RpcLedgerAccountsGetPending ,
428
437
RpcLedgerAccountsGetSuccess ,
429
438
RpcMessageProgressGet ,
439
+ RpcP2pConnectionIncomingAnswerReady ,
430
440
RpcP2pConnectionIncomingError ,
431
441
RpcP2pConnectionIncomingInit ,
432
442
RpcP2pConnectionIncomingPending ,
@@ -510,6 +520,7 @@ pub enum ActionKind {
510
520
TransactionPoolVerifyError ,
511
521
TransactionPoolEffectfulFetchAccounts ,
512
522
TransitionFrontierGenesisInject ,
523
+ TransitionFrontierRpcRespondBestTip ,
513
524
TransitionFrontierSyncFailed ,
514
525
TransitionFrontierSynced ,
515
526
TransitionFrontierGenesisLedgerLoadInit ,
@@ -559,6 +570,7 @@ pub enum ActionKind {
559
570
TransitionFrontierSyncLedgerSnarkedNumAccountsReceived ,
560
571
TransitionFrontierSyncLedgerSnarkedNumAccountsRejected ,
561
572
TransitionFrontierSyncLedgerSnarkedNumAccountsSuccess ,
573
+ TransitionFrontierSyncLedgerSnarkedP2pDisconnection ,
562
574
TransitionFrontierSyncLedgerSnarkedPeerQueryAddressError ,
563
575
TransitionFrontierSyncLedgerSnarkedPeerQueryAddressInit ,
564
576
TransitionFrontierSyncLedgerSnarkedPeerQueryAddressPending ,
@@ -599,7 +611,7 @@ pub enum ActionKind {
599
611
}
600
612
601
613
impl ActionKind {
602
- pub const COUNT : u16 = 493 ;
614
+ pub const COUNT : u16 = 504 ;
603
615
}
604
616
605
617
impl std:: fmt:: Display for ActionKind {
@@ -614,6 +626,7 @@ impl ActionKindGet for Action {
614
626
Self :: CheckTimeouts ( a) => a. kind ( ) ,
615
627
Self :: EventSource ( a) => a. kind ( ) ,
616
628
Self :: P2p ( a) => a. kind ( ) ,
629
+ Self :: P2pCallbacks ( a) => a. kind ( ) ,
617
630
Self :: Ledger ( a) => a. kind ( ) ,
618
631
Self :: Snark ( a) => a. kind ( ) ,
619
632
Self :: Consensus ( a) => a. kind ( ) ,
@@ -664,6 +677,30 @@ impl ActionKindGet for P2pAction {
664
677
}
665
678
}
666
679
680
+ impl ActionKindGet for P2pCallbacksAction {
681
+ fn kind ( & self ) -> ActionKind {
682
+ match self {
683
+ Self :: P2pChannelsRpcReady { .. } => ActionKind :: P2pCallbacksP2pChannelsRpcReady ,
684
+ Self :: P2pChannelsRpcTimeout { .. } => ActionKind :: P2pCallbacksP2pChannelsRpcTimeout ,
685
+ Self :: P2pChannelsRpcResponseReceived { .. } => {
686
+ ActionKind :: P2pCallbacksP2pChannelsRpcResponseReceived
687
+ }
688
+ Self :: P2pChannelsRpcRequestReceived { .. } => {
689
+ ActionKind :: P2pCallbacksP2pChannelsRpcRequestReceived
690
+ }
691
+ Self :: P2pChannelsStreamingRpcReady => {
692
+ ActionKind :: P2pCallbacksP2pChannelsStreamingRpcReady
693
+ }
694
+ Self :: P2pChannelsStreamingRpcTimeout { .. } => {
695
+ ActionKind :: P2pCallbacksP2pChannelsStreamingRpcTimeout
696
+ }
697
+ Self :: P2pChannelsStreamingRpcResponseReceived { .. } => {
698
+ ActionKind :: P2pCallbacksP2pChannelsStreamingRpcResponseReceived
699
+ }
700
+ }
701
+ }
702
+ }
703
+
667
704
impl ActionKindGet for LedgerAction {
668
705
fn kind ( & self ) -> ActionKind {
669
706
match self {
@@ -698,6 +735,7 @@ impl ActionKindGet for ConsensusAction {
698
735
Self :: ShortRangeForkResolve { .. } => ActionKind :: ConsensusShortRangeForkResolve ,
699
736
Self :: LongRangeForkResolve { .. } => ActionKind :: ConsensusLongRangeForkResolve ,
700
737
Self :: BestTipUpdate { .. } => ActionKind :: ConsensusBestTipUpdate ,
738
+ Self :: P2pBestTipUpdate { .. } => ActionKind :: ConsensusP2pBestTipUpdate ,
701
739
Self :: Prune => ActionKind :: ConsensusPrune ,
702
740
}
703
741
}
@@ -712,6 +750,7 @@ impl ActionKindGet for TransitionFrontierAction {
712
750
Self :: GenesisInject => ActionKind :: TransitionFrontierGenesisInject ,
713
751
Self :: Synced { .. } => ActionKind :: TransitionFrontierSynced ,
714
752
Self :: SyncFailed { .. } => ActionKind :: TransitionFrontierSyncFailed ,
753
+ Self :: RpcRespondBestTip { .. } => ActionKind :: TransitionFrontierRpcRespondBestTip ,
715
754
}
716
755
}
717
756
}
@@ -857,6 +896,9 @@ impl ActionKindGet for RpcAction {
857
896
Self :: P2pConnectionIncomingRespond { .. } => {
858
897
ActionKind :: RpcP2pConnectionIncomingRespond
859
898
}
899
+ Self :: P2pConnectionIncomingAnswerReady { .. } => {
900
+ ActionKind :: RpcP2pConnectionIncomingAnswerReady
901
+ }
860
902
Self :: P2pConnectionIncomingError { .. } => ActionKind :: RpcP2pConnectionIncomingError ,
861
903
Self :: P2pConnectionIncomingSuccess { .. } => {
862
904
ActionKind :: RpcP2pConnectionIncomingSuccess
@@ -1880,6 +1922,9 @@ impl ActionKindGet for TransitionFrontierSyncLedgerSnarkedAction {
1880
1922
ActionKind :: TransitionFrontierSyncLedgerSnarkedMerkleTreeSyncSuccess
1881
1923
}
1882
1924
Self :: Success => ActionKind :: TransitionFrontierSyncLedgerSnarkedSuccess ,
1925
+ Self :: P2pDisconnection { .. } => {
1926
+ ActionKind :: TransitionFrontierSyncLedgerSnarkedP2pDisconnection
1927
+ }
1883
1928
}
1884
1929
}
1885
1930
}
0 commit comments