Skip to content

Commit

Permalink
refactor: isolate VersionedEnvelope
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin O'Donnell <[email protected]>
  • Loading branch information
scealiontach committed Jun 4, 2021
1 parent d8f5664 commit adb4b0c
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 11 deletions.
28 changes: 28 additions & 0 deletions daml-on-sawtooth-protobufs/src/main/protos/btp_utils.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2020 Blockchain Technology Partners
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto3";

option java_multiple_files = true;
package com.blockchaintp.utils.protobuf;
import "google/protobuf/timestamp.proto";

message VersionedEnvelope {
string version = 1;
bytes data = 2;
string contentHash = 3;
int32 parts = 4;
int32 partNumber = 5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,3 @@ message DamlLogEvent {
bytes logEntry = 3;
bytes timeUpdate = 4;
}

message VersionedEnvelope {
string version = 1;
bytes data = 2;
string contentHash = 3;
int32 parts = 4;
int32 partNumber = 5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.zip.Deflater;
import java.util.zip.Inflater;

import com.blockchaintp.sawtooth.daml.protobuf.VersionedEnvelope;
import com.blockchaintp.utils.protobuf.VersionedEnvelope;
import com.blockchaintp.keymanager.KeyManager;
import com.google.protobuf.ByteString;
import com.google.protobuf.InvalidProtocolBufferException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import com.blockchaintp.sawtooth.daml.EventConstants;
import com.blockchaintp.sawtooth.daml.exceptions.DamlSawtoothRuntimeException;
import com.blockchaintp.sawtooth.daml.protobuf.VersionedEnvelope;
import com.blockchaintp.utils.protobuf.VersionedEnvelope;
import com.blockchaintp.sawtooth.messaging.ZmqStream;
import com.blockchaintp.utils.SawtoothClientUtils;
import com.daml.ledger.participant.state.kvutils.KVOffset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import com.blockchaintp.sawtooth.daml.exceptions.DamlSawtoothRuntimeException;
import com.blockchaintp.sawtooth.daml.protobuf.DamlTransaction;
import com.blockchaintp.sawtooth.daml.protobuf.DamlTransactionFragment;
import com.blockchaintp.sawtooth.daml.protobuf.VersionedEnvelope;
import com.blockchaintp.utils.protobuf.VersionedEnvelope;
import com.blockchaintp.sawtooth.timekeeper.protobuf.TimeKeeperGlobalRecord;
import com.blockchaintp.utils.SawtoothClientUtils;
import com.daml.ledger.validator.LedgerStateOperations;
Expand Down

0 comments on commit adb4b0c

Please sign in to comment.