|
@ -11,6 +11,7 @@ import ( |
|
|
"io" |
|
|
"io" |
|
|
"math" |
|
|
"math" |
|
|
"net" |
|
|
"net" |
|
|
|
|
|
"sync" |
|
|
"time" |
|
|
"time" |
|
|
|
|
|
|
|
|
gogotypes "github.com/gogo/protobuf/types" |
|
|
gogotypes "github.com/gogo/protobuf/types" |
|
@ -25,7 +26,6 @@ import ( |
|
|
"github.com/tendermint/tendermint/crypto/ed25519" |
|
|
"github.com/tendermint/tendermint/crypto/ed25519" |
|
|
"github.com/tendermint/tendermint/crypto/encoding" |
|
|
"github.com/tendermint/tendermint/crypto/encoding" |
|
|
"github.com/tendermint/tendermint/internal/libs/protoio" |
|
|
"github.com/tendermint/tendermint/internal/libs/protoio" |
|
|
tmsync "github.com/tendermint/tendermint/internal/libs/sync" |
|
|
|
|
|
"github.com/tendermint/tendermint/libs/async" |
|
|
"github.com/tendermint/tendermint/libs/async" |
|
|
tmprivval "github.com/tendermint/tendermint/proto/tendermint/privval" |
|
|
tmprivval "github.com/tendermint/tendermint/proto/tendermint/privval" |
|
|
) |
|
|
) |
|
@ -80,11 +80,11 @@ type SecretConnection struct { |
|
|
// are independent, so we can use two mtxs.
|
|
|
// are independent, so we can use two mtxs.
|
|
|
// All .Read are covered by recvMtx,
|
|
|
// All .Read are covered by recvMtx,
|
|
|
// all .Write are covered by sendMtx.
|
|
|
// all .Write are covered by sendMtx.
|
|
|
recvMtx tmsync.Mutex |
|
|
|
|
|
|
|
|
recvMtx sync.Mutex |
|
|
recvBuffer []byte |
|
|
recvBuffer []byte |
|
|
recvNonce *[aeadNonceSize]byte |
|
|
recvNonce *[aeadNonceSize]byte |
|
|
|
|
|
|
|
|
sendMtx tmsync.Mutex |
|
|
|
|
|
|
|
|
sendMtx sync.Mutex |
|
|
sendNonce *[aeadNonceSize]byte |
|
|
sendNonce *[aeadNonceSize]byte |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|