github.com/supragya/TendermintConnector@v0.0.0-20210619045051-113e32b84fb1/_deprecated_chains/cosmos/structsMarlin.go (about) 1 package cosmos 2 3 import ( 4 "net" 5 "sync" 6 7 amino "github.com/tendermint/go-amino" 8 lru "github.com/hashicorp/golang-lru" 9 "github.com/tendermint/tendermint/crypto/ed25519" 10 "github.com/supragya/TendermintConnector/chains/cosmos/conn" 11 marlinTypes "github.com/supragya/TendermintConnector/types" 12 ) 13 14 type TendermintHandler struct { 15 servicedChainId uint32 16 listenPort int 17 isConnectionOutgoing bool 18 peerAddr string 19 rpcAddr string 20 privateKey ed25519.PrivKeyEd25519 21 codec *amino.Codec 22 baseConnection net.Conn 23 validatorCache *lru.TwoQueueCache 24 maxValidHeight int64 25 secretConnection *conn.SecretConnection 26 marlinTo chan marlinTypes.MarlinMessage 27 marlinFrom chan marlinTypes.MarlinMessage 28 channelBuffer map[byte][]marlinTypes.PacketMsg 29 peerNodeInfo DefaultNodeInfo 30 p2pConnection P2PConnection 31 throughput throughPutData 32 signalConnError chan struct{} 33 signalShutSend chan struct{} 34 signalShutRecv chan struct{} 35 signalShutThroughput chan struct{} 36 } 37 38 type throughPutData struct { 39 isDataConnect bool 40 toTMCore map[string]uint32 41 fromTMCore map[string]uint32 42 spam map[string]uint32 43 mu sync.Mutex 44 } 45 46 type keyData struct { 47 Chain string 48 IdString string 49 PrivateKeyString string 50 PublicKeyString string 51 PrivateKey [64]byte 52 PublicKey [32]byte 53 } 54 55 type Validator struct { 56 PublicKey ed25519.PubKeyEd25519 57 Address string 58 }