watchtower/blob/justice_kit: add BlobType to JusticeKit struct

This is preparation for later commits where the values returned by
member methods will need to be conditioned on the blob type used during
decryption.
This commit is contained in:
Conner Fromknecht
2020-09-15 12:43:37 -04:00
parent b82695dbcc
commit ffe15e2820
4 changed files with 42 additions and 10 deletions

View File

@@ -150,6 +150,7 @@ func TestBlobJusticeKitEncryptDecrypt(t *testing.T) {
func testBlobJusticeKitEncryptDecrypt(t *testing.T, test descriptorTest) {
boj := &blob.JusticeKit{
BlobType: test.encVersion,
SweepAddress: test.sweepAddr,
RevocationPubKey: test.revPubKey,
LocalDelayPubKey: test.delayPubKey,
@@ -170,7 +171,7 @@ func testBlobJusticeKitEncryptDecrypt(t *testing.T, test descriptorTest) {
// Encrypt the blob plaintext using the generated key and
// target version for this test.
ctxt, err := boj.Encrypt(key, test.encVersion)
ctxt, err := boj.Encrypt(key)
if err != test.encErr {
t.Fatalf("unable to encrypt blob: %v", err)
} else if test.encErr != nil {