From 8b47a96459b9edab3ab48aaf191e2aac11a367a3 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Tue, 23 Oct 2018 18:28:35 -0700 Subject: [PATCH] watchtower/wtdb/session_state_update: adds session state --- watchtower/wtdb/session_state_update.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 watchtower/wtdb/session_state_update.go diff --git a/watchtower/wtdb/session_state_update.go b/watchtower/wtdb/session_state_update.go new file mode 100644 index 00000000..7711b10f --- /dev/null +++ b/watchtower/wtdb/session_state_update.go @@ -0,0 +1,23 @@ +package wtdb + +// SessionStateUpdate holds a state update sent by a client along with its +// SessionID. +type SessionStateUpdate struct { + // ID the session id of the client who sent the state update. + ID SessionID + + // SeqNum the sequence number of the update within the session. + SeqNum uint16 + + // LastApplied the highest index that client has acknowledged is + // committed + LastApplied uint16 + + // Hint is the 16-byte prefix of the revoked commitment transaction. + Hint BreachHint + + // EncryptedBlob is a ciphertext containing the sweep information for + // exacting justice if the commitment transaction matching the breach + // hint is braodcast. + EncryptedBlob []byte +}