1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use crateMsg;
/// Message container holding received messages
///
/// Trait only purpose is to pin [MessageStore] constructing this container
/// Accumulates messages received from other parties
///
/// StateMachine implementations need to handle incoming messages: they need to store messages
/// somewhere until sufficient messages received, incoming messages needs to be pre-validated
/// (haven't we received message from this party at this round? is it a p2p message, as we expected?
/// and so on). MessageStore encapsulates all this boilerplate.