Remove receiver chains that are 5 old.
This commit is contained in:
parent
ff0dff745c
commit
842df1ac39
1 changed files with 6 additions and 1 deletions
|
@ -230,8 +230,13 @@ public class SessionRecordV2 extends Record {
|
|||
.setSenderEphemeral(ByteString.copyFrom(senderEphemeral.serialize()))
|
||||
.build();
|
||||
|
||||
// XXX knock old chain out.
|
||||
this.sessionStructure = this.sessionStructure.toBuilder().addReceiverChains(chain).build();
|
||||
|
||||
if (this.sessionStructure.getReceiverChainsList().size() > 5) {
|
||||
this.sessionStructure = this.sessionStructure.toBuilder()
|
||||
.removeReceiverChains(0)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
public void setSenderChain(ECKeyPair senderEphemeralPair, ChainKey chainKey) {
|
||||
|
|
Loading…
Add table
Reference in a new issue