Skip to content

Commit 3d98f1a

Browse files
committed
feat(actions): avoid excessive EnablingCondition
1 parent 9fc4890 commit 3d98f1a

File tree

10 files changed

+2
-21
lines changed

10 files changed

+2
-21
lines changed

node/src/p2p/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ where
3232

3333
fn dispatch<A>(&mut self, action: A) -> bool
3434
where
35-
A: Into<P2pAction> + redux::EnablingCondition<crate::State>,
35+
A: Into<P2pAction> + redux::EnablingCondition<P2pState>,
3636
{
3737
crate::Store::sub_dispatch(self, action)
3838
}

node/src/snark/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ where
2727

2828
fn dispatch<A>(&mut self, action: A) -> bool
2929
where
30-
A: Into<SnarkAction> + redux::EnablingCondition<crate::State>,
30+
A: Into<SnarkAction> + redux::EnablingCondition<SnarkState>,
3131
{
3232
crate::Store::sub_dispatch(self, action)
3333
}

p2p/src/channels/best_tip/p2p_channels_best_tip_effects.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ impl P2pChannelsBestTipAction {
1212
where
1313
Store: crate::P2pStore<S>,
1414
Store::Service: P2pChannelsService,
15-
P2pChannelsBestTipAction: redux::EnablingCondition<S>,
16-
P2pPeerAction: redux::EnablingCondition<S>,
1715
{
1816
match self {
1917
P2pChannelsBestTipAction::Init { peer_id } => {

p2p/src/channels/p2p_channels_effects.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ impl P2pChannelsMessageReceivedAction {
1717
pub fn effects<Store, S>(self, _: &ActionMeta, store: &mut Store)
1818
where
1919
Store: crate::P2pStore<S>,
20-
P2pChannelsBestTipAction: redux::EnablingCondition<S>,
21-
P2pChannelsSnarkAction: redux::EnablingCondition<S>,
22-
P2pChannelsSnarkJobCommitmentAction: redux::EnablingCondition<S>,
23-
P2pChannelsRpcAction: redux::EnablingCondition<S>,
24-
P2pDisconnectionAction: redux::EnablingCondition<S>,
2520
{
2621
let peer_id = self.peer_id;
2722
let chan_id = self.message.channel_id();

p2p/src/channels/snark/p2p_channels_snark_effects.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ impl P2pChannelsSnarkAction {
99
where
1010
Store: crate::P2pStore<S>,
1111
Store::Service: P2pChannelsService,
12-
Self: redux::EnablingCondition<S>,
1312
{
1413
match self {
1514
P2pChannelsSnarkAction::Init { peer_id } => {

p2p/src/channels/snark_job_commitment/p2p_channels_snark_job_commitment_effects.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ impl P2pChannelsSnarkJobCommitmentAction {
99
where
1010
Store: crate::P2pStore<S>,
1111
Store::Service: P2pChannelsService,
12-
P2pChannelsSnarkJobCommitmentAction: redux::EnablingCondition<S>,
1312
{
1413
match self {
1514
P2pChannelsSnarkJobCommitmentAction::Init { peer_id } => {

p2p/src/connection/incoming/p2p_connection_incoming_effects.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ impl P2pConnectionIncomingAction {
1111
where
1212
Store: crate::P2pStore<S>,
1313
Store::Service: P2pConnectionService,
14-
P2pDisconnectionAction: redux::EnablingCondition<S>,
15-
P2pPeerAction: redux::EnablingCondition<S>,
16-
P2pConnectionIncomingAction: redux::EnablingCondition<S>,
1714
{
1815
match self {
1916
P2pConnectionIncomingAction::Init { opts, .. } => {

p2p/src/connection/outgoing/p2p_connection_outgoing_effects.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ impl P2pConnectionOutgoingAction {
1616
where
1717
Store: crate::P2pStore<S>,
1818
Store::Service: P2pConnectionService,
19-
Self: redux::EnablingCondition<S>,
20-
P2pPeerAction: redux::EnablingCondition<S>,
2119
{
2220
match self {
2321
P2pConnectionOutgoingAction::RandomInit => {

p2p/src/disconnection/p2p_disconnection_effects.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ impl P2pDisconnectionAction {
77
where
88
Store: crate::P2pStore<S>,
99
Store::Service: P2pDisconnectionService,
10-
P2pDisconnectionAction: redux::EnablingCondition<S>,
1110
{
1211
match self {
1312
P2pDisconnectionAction::Init { peer_id, .. } => {

p2p/src/peer/p2p_peer_effects.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ impl P2pPeerAction {
1111
pub fn effects<Store, S>(self, _: &ActionMeta, store: &mut Store)
1212
where
1313
Store: crate::P2pStore<S>,
14-
P2pChannelsBestTipAction: redux::EnablingCondition<S>,
15-
P2pChannelsSnarkAction: redux::EnablingCondition<S>,
16-
P2pChannelsSnarkJobCommitmentAction: redux::EnablingCondition<S>,
17-
P2pChannelsRpcAction: redux::EnablingCondition<S>,
1814
{
1915
match self {
2016
P2pPeerAction::Ready { peer_id, .. } => {

0 commit comments

Comments
 (0)