diff --git a/src/peers.c b/src/peers.c index d6714fed0..b8aae1678 100644 --- a/src/peers.c +++ b/src/peers.c @@ -90,16 +90,18 @@ /* Remote peer teaching state */ /******************************/ #define PEER_F_TEACH_PROCESS 0x00000001 /* Teach a lesson to current peer */ -#define PEER_F_TEACH_FINISHED 0x00000008 /* Teach conclude, (wait for confirm) */ -#define PEER_F_TEACH_COMPLETE 0x00000010 /* All that we know already taught to current peer, used only for a local peer */ -#define PEER_F_LEARN_ASSIGN 0x00000100 /* Current peer was assigned for a lesson */ -#define PEER_F_LEARN_NOTUP2DATE 0x00000200 /* Learn from peer finished but peer is not up to date */ +#define PEER_F_TEACH_FINISHED 0x00000002 /* Teach conclude, (wait for confirm) */ +#define PEER_F_TEACH_COMPLETE 0x00000004 /* All that we know already taught to current peer, used only for a local peer */ +#define PEER_F_LEARN_ASSIGN 0x00000010 /* Current peer was assigned for a lesson */ +#define PEER_F_LEARN_PROCESS 0x00000020 /* Learn from peer was started */ +#define PEER_F_LEARN_FINISHED 0x00000040 /* Learn from peer fully finished */ +#define PEER_F_LEARN_NOTUP2DATE 0x00000080 /* Learn from peer finished but peer is not up to date */ #define PEER_F_ALIVE 0x20000000 /* Used to flag a peer a alive. */ #define PEER_F_HEARTBEAT 0x40000000 /* Heartbeat message to send. */ #define PEER_F_DWNGRD 0x80000000 /* When this flag is enabled, we must downgrade the supported version announced during peer sessions. */ #define PEER_TEACH_RESET ~(PEER_F_TEACH_PROCESS|PEER_F_TEACH_FINISHED) /* PEER_F_TEACH_COMPLETE should never be reset */ -#define PEER_LEARN_RESET ~(PEER_F_LEARN_ASSIGN|PEER_F_LEARN_NOTUP2DATE) +#define PEER_LEARN_RESET ~(PEER_F_LEARN_ASSIGN|PEER_F_LEARN_PROCESS|PEER_F_LEARN_FINISHED|PEER_F_LEARN_NOTUP2DATE) #define PEER_RESYNC_TIMEOUT 5000 /* 5 seconds */ #define PEER_RECONNECT_TIMEOUT 5000 /* 5 seconds */