mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-24 22:32:15 +00:00
Remove gogoproto from Makefile's TOOLS (#2198)
* remove gogoproto from tools because it's not a binary * update protobuf version to 3.6.1 in `make get_protoc` * update libs/common/types.pb.go and rpc/grpc/types.pb.go * fix app tests
This commit is contained in:
parent
785786bec4
commit
fc7c298cc0
45
Gopkg.lock
generated
45
Gopkg.lock
generated
@ -11,14 +11,14 @@
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:6aabc1566d6351115d561d038da82a4c19b46c3b6e17f4a0a2fa60260663dc79"
|
||||
digest = "1:2c00f064ba355903866cbfbf3f7f4c0fe64af6638cc7d1b8bdcf3181bc67f1d8"
|
||||
name = "github.com/btcsuite/btcd"
|
||||
packages = ["btcec"]
|
||||
pruneopts = "UT"
|
||||
revision = "f5e261fc9ec3437697fb31d8b38453c293204b29"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:df684ed7fed3fb406ec421424aaf5fc9c63ccc2f428b25b842da78e634482e4b"
|
||||
digest = "1:1d8e1cb71c33a9470bbbae09bfec09db43c6bf358dfcae13cd8807c4e2a9a2bf"
|
||||
name = "github.com/btcsuite/btcutil"
|
||||
packages = [
|
||||
"base58",
|
||||
@ -59,7 +59,7 @@
|
||||
version = "v1.4.7"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:fa30c0652956e159cdb97dcb2ef8b8db63ed668c02a5c3a40961c8f0641252fe"
|
||||
digest = "1:fdf5169073fb0ad6dc12a70c249145e30f4058647bea25f0abd48b6d9f228a11"
|
||||
name = "github.com/go-kit/kit"
|
||||
packages = [
|
||||
"log",
|
||||
@ -91,7 +91,7 @@
|
||||
version = "v1.7.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:212285efb97b9ec2e20550d81f0446cb7897e57cbdfd7301b1363ab113d8be45"
|
||||
digest = "1:35621fe20f140f05a0c4ef662c26c0ab4ee50bca78aa30fe87d33120bd28165e"
|
||||
name = "github.com/gogo/protobuf"
|
||||
packages = [
|
||||
"gogoproto",
|
||||
@ -106,7 +106,7 @@
|
||||
version = "v1.1.1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:cb22af0ed7c72d495d8be1106233ee553898950f15fd3f5404406d44c2e86888"
|
||||
digest = "1:17fe264ee908afc795734e8c4e63db2accabaf57326dbf21763a7d6b86096260"
|
||||
name = "github.com/golang/protobuf"
|
||||
packages = [
|
||||
"proto",
|
||||
@ -137,7 +137,7 @@
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:8951fe6e358876736d8fa1f3992624fdbb2dec6bc49401c1381d1ef8abbb544f"
|
||||
digest = "1:12247a2e99a060cc692f6680e5272c8adf0b8f572e6bce0d7095e624c958a240"
|
||||
name = "github.com/hashicorp/hcl"
|
||||
packages = [
|
||||
".",
|
||||
@ -225,7 +225,7 @@
|
||||
version = "v1.0.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:98225904b7abff96c052b669b25788f18225a36673fba022fb93514bb9a2a64e"
|
||||
digest = "1:c1a04665f9613e082e1209cf288bf64f4068dcd6c87a64bf1c4ff006ad422ba0"
|
||||
name = "github.com/prometheus/client_golang"
|
||||
packages = [
|
||||
"prometheus",
|
||||
@ -236,7 +236,7 @@
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:0f37e09b3e92aaeda5991581311f8dbf38944b36a3edec61cc2d1991f527554a"
|
||||
digest = "1:2d5cd61daa5565187e1d96bae64dbbc6080dacf741448e9629c64fd93203b0d4"
|
||||
name = "github.com/prometheus/client_model"
|
||||
packages = ["go"]
|
||||
pruneopts = "UT"
|
||||
@ -256,7 +256,7 @@
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:a37c98f4b7a66bb5c539c0539f0915a74ef1c8e0b3b6f45735289d94cae92bfd"
|
||||
digest = "1:8c49953a1414305f2ff5465147ee576dd705487c35b15918fcd4efdc0cb7a290"
|
||||
name = "github.com/prometheus/procfs"
|
||||
packages = [
|
||||
".",
|
||||
@ -275,7 +275,7 @@
|
||||
revision = "e2704e165165ec55d062f5919b4b29494e9fa790"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:37ace7f35375adec11634126944bdc45a673415e2fcc07382d03b75ec76ea94c"
|
||||
digest = "1:bd1ae00087d17c5a748660b8e89e1043e1e5479d0fea743352cda2f8dd8c4f84"
|
||||
name = "github.com/spf13/afero"
|
||||
packages = [
|
||||
".",
|
||||
@ -294,7 +294,7 @@
|
||||
version = "v1.2.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:627ab2f549a6a55c44f46fa24a4307f4d0da81bfc7934ed0473bf38b24051d26"
|
||||
digest = "1:7ffc0983035bc7e297da3688d9fe19d60a420e9c38bef23f845c53788ed6a05e"
|
||||
name = "github.com/spf13/cobra"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
@ -326,7 +326,7 @@
|
||||
version = "v1.0.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:73697231b93fb74a73ebd8384b68b9a60c57ea6b13c56d2425414566a72c8e6d"
|
||||
digest = "1:7e8d267900c7fa7f35129a2a37596e38ed0f11ca746d6d9ba727980ee138f9f6"
|
||||
name = "github.com/stretchr/testify"
|
||||
packages = [
|
||||
"assert",
|
||||
@ -338,7 +338,7 @@
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:922191411ad8f61bcd8018ac127589bb489712c1d1a0ab2497aca4b16de417d2"
|
||||
digest = "1:b3cfb8d82b1601a846417c3f31c03a7961862cb2c98dcf0959c473843e6d9a2b"
|
||||
name = "github.com/syndtr/goleveldb"
|
||||
packages = [
|
||||
"leveldb",
|
||||
@ -359,7 +359,7 @@
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:203b409c21115233a576f99e8f13d8e07ad82b25500491f7e1cca12588fb3232"
|
||||
digest = "1:087aaa7920e5d0bf79586feb57ce01c35c830396ab4392798112e8aae8c47722"
|
||||
name = "github.com/tendermint/ed25519"
|
||||
packages = [
|
||||
".",
|
||||
@ -377,9 +377,17 @@
|
||||
revision = "a8328986c1608950fa5d3d1c0472cccc4f8fc02c"
|
||||
version = "v0.12.0-rc0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:cefd237469d443fe56cbeadf68a1baf46cef293f071dc0e317f8b8062c3ffe72"
|
||||
name = "github.com/tendermint/go-crypto"
|
||||
packages = ["tmhash"]
|
||||
pruneopts = "UT"
|
||||
revision = "6a6b591a3d7592a04b46af95451cb5be3b114f76"
|
||||
version = "v0.9.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:df132ec33d5acb4a1ab58d637f1bc3557be49456ca59b9198f5c1e7fa32e0d31"
|
||||
digest = "1:c31a37cafc12315b8bd745c8ad6a006ac25350472488162a821e557b3e739d67"
|
||||
name = "golang.org/x/crypto"
|
||||
packages = [
|
||||
"bcrypt",
|
||||
@ -401,7 +409,7 @@
|
||||
revision = "56440b844dfe139a8ac053f4ecac0b20b79058f4"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:04dda8391c3e2397daf254ac68003f30141c069b228d06baec8324a5f81dc1e9"
|
||||
digest = "1:d36f55a999540d29b6ea3c2ea29d71c76b1d9853fdcd3e5c5cb4836f2ba118f1"
|
||||
name = "golang.org/x/net"
|
||||
packages = [
|
||||
"context",
|
||||
@ -428,7 +436,7 @@
|
||||
revision = "3dc4335d56c789b04b0ba99b7a37249d9b614314"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:7509ba4347d1f8de6ae9be8818b0cd1abc3deeffe28aeaf4be6d4b6b5178d9ca"
|
||||
digest = "1:a2ab62866c75542dd18d2b069fec854577a20211d7c0ea6ae746072a1dccdd18"
|
||||
name = "golang.org/x/text"
|
||||
packages = [
|
||||
"collate",
|
||||
@ -459,7 +467,7 @@
|
||||
revision = "daca94659cb50e9f37c1b834680f2e46358f10b0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:4515e3030c440845b046354fd5d57671238428b820deebce2e9dabb5cd3c51ac"
|
||||
digest = "1:2dab32a43451e320e49608ff4542fdfc653c95dcc35d0065ec9c6c3dd540ed74"
|
||||
name = "google.golang.org/grpc"
|
||||
packages = [
|
||||
".",
|
||||
@ -538,6 +546,7 @@
|
||||
"github.com/tendermint/ed25519",
|
||||
"github.com/tendermint/ed25519/extra25519",
|
||||
"github.com/tendermint/go-amino",
|
||||
"github.com/tendermint/go-crypto/tmhash",
|
||||
"golang.org/x/crypto/bcrypt",
|
||||
"golang.org/x/crypto/chacha20poly1305",
|
||||
"golang.org/x/crypto/curve25519",
|
||||
|
13
Makefile
13
Makefile
@ -3,7 +3,6 @@ GOTOOLS = \
|
||||
github.com/golang/dep/cmd/dep \
|
||||
gopkg.in/alecthomas/gometalinter.v2 \
|
||||
github.com/gogo/protobuf/protoc-gen-gogo \
|
||||
github.com/gogo/protobuf/gogoproto \
|
||||
github.com/square/certstrap
|
||||
PACKAGES=$(shell go list ./...)
|
||||
|
||||
@ -75,7 +74,7 @@ get_tools:
|
||||
|
||||
update_tools:
|
||||
@echo "--> Updating tools"
|
||||
@go get -u $(GOTOOLS)
|
||||
go get -u -v $(GOTOOLS)
|
||||
|
||||
#Update dependencies
|
||||
get_vendor_deps:
|
||||
@ -85,13 +84,15 @@ get_vendor_deps:
|
||||
#For ABCI and libs
|
||||
get_protoc:
|
||||
@# https://github.com/google/protobuf/releases
|
||||
curl -L https://github.com/google/protobuf/releases/download/v3.4.1/protobuf-cpp-3.4.1.tar.gz | tar xvz && \
|
||||
cd protobuf-3.4.1 && \
|
||||
curl -L https://github.com/google/protobuf/releases/download/v3.6.1/protobuf-cpp-3.6.1.tar.gz | tar xvz && \
|
||||
cd protobuf-3.6.1 && \
|
||||
DIST_LANG=cpp ./configure && \
|
||||
make && \
|
||||
make install && \
|
||||
make check && \
|
||||
sudo make install && \
|
||||
sudo ldconfig && \
|
||||
cd .. && \
|
||||
rm -rf protobuf-3.4.1
|
||||
rm -rf protobuf-3.6.1
|
||||
|
||||
draw_deps:
|
||||
@# requires brew install graphviz or apt-get install graphviz
|
||||
|
@ -81,8 +81,8 @@ func (app *KVStoreApplication) DeliverTx(tx []byte) types.ResponseDeliverTx {
|
||||
app.state.Size += 1
|
||||
|
||||
tags := []cmn.KVPair{
|
||||
{[]byte("app.creator"), []byte("jae")},
|
||||
{[]byte("app.key"), key},
|
||||
{Key: []byte("app.creator"), Value: []byte("jae")},
|
||||
{Key: []byte("app.key"), Value: key},
|
||||
}
|
||||
return types.ResponseDeliverTx{Code: code.CodeTypeOK, Tags: tags}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ func TestMarshalJSON(t *testing.T) {
|
||||
Data: []byte("hello"),
|
||||
GasWanted: 43,
|
||||
Tags: []cmn.KVPair{
|
||||
{[]byte("pho"), []byte("bo")},
|
||||
{Key: []byte("pho"), Value: []byte("bo")},
|
||||
},
|
||||
}
|
||||
b, err = json.Marshal(&r1)
|
||||
@ -83,7 +83,7 @@ func TestWriteReadMessage2(t *testing.T) {
|
||||
Log: phrase,
|
||||
GasWanted: 10,
|
||||
Tags: []cmn.KVPair{
|
||||
cmn.KVPair{[]byte("abc"), []byte("def")},
|
||||
cmn.KVPair{Key: []byte("abc"), Value: []byte("def")},
|
||||
},
|
||||
},
|
||||
// TODO: add the rest
|
||||
|
@ -16,8 +16,10 @@ import time "time"
|
||||
|
||||
import bytes "bytes"
|
||||
|
||||
import context "golang.org/x/net/context"
|
||||
import grpc "google.golang.org/grpc"
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
||||
grpc "google.golang.org/grpc"
|
||||
)
|
||||
|
||||
import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
||||
|
||||
@ -4998,8 +5000,9 @@ var _ grpc.ClientConn
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// Client API for ABCIApplication service
|
||||
|
||||
// ABCIApplicationClient is the client API for ABCIApplication service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type ABCIApplicationClient interface {
|
||||
Echo(ctx context.Context, in *RequestEcho, opts ...grpc.CallOption) (*ResponseEcho, error)
|
||||
Flush(ctx context.Context, in *RequestFlush, opts ...grpc.CallOption) (*ResponseFlush, error)
|
||||
|
@ -1,16 +1,6 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: libs/common/types.proto
|
||||
|
||||
/*
|
||||
Package common is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
libs/common/types.proto
|
||||
|
||||
It has these top-level messages:
|
||||
KVPair
|
||||
KI64Pair
|
||||
*/
|
||||
//nolint
|
||||
package common
|
||||
|
||||
@ -40,12 +30,43 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
type KVPair struct {
|
||||
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *KVPair) Reset() { *m = KVPair{} }
|
||||
func (m *KVPair) String() string { return proto.CompactTextString(m) }
|
||||
func (*KVPair) ProtoMessage() {}
|
||||
func (*KVPair) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} }
|
||||
func (*KVPair) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_611b4364a8604338, []int{0}
|
||||
}
|
||||
func (m *KVPair) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *KVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_KVPair.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalTo(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (dst *KVPair) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_KVPair.Merge(dst, src)
|
||||
}
|
||||
func (m *KVPair) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *KVPair) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_KVPair.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_KVPair proto.InternalMessageInfo
|
||||
|
||||
func (m *KVPair) GetKey() []byte {
|
||||
if m != nil {
|
||||
@ -65,12 +86,43 @@ func (m *KVPair) GetValue() []byte {
|
||||
type KI64Pair struct {
|
||||
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *KI64Pair) Reset() { *m = KI64Pair{} }
|
||||
func (m *KI64Pair) String() string { return proto.CompactTextString(m) }
|
||||
func (*KI64Pair) ProtoMessage() {}
|
||||
func (*KI64Pair) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} }
|
||||
func (*KI64Pair) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_611b4364a8604338, []int{1}
|
||||
}
|
||||
func (m *KI64Pair) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *KI64Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_KI64Pair.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalTo(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (dst *KI64Pair) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_KI64Pair.Merge(dst, src)
|
||||
}
|
||||
func (m *KI64Pair) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *KI64Pair) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_KI64Pair.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_KI64Pair proto.InternalMessageInfo
|
||||
|
||||
func (m *KI64Pair) GetKey() []byte {
|
||||
if m != nil {
|
||||
@ -117,6 +169,9 @@ func (this *KVPair) Equal(that interface{}) bool {
|
||||
if !bytes.Equal(this.Value, that1.Value) {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *KI64Pair) Equal(that interface{}) bool {
|
||||
@ -144,6 +199,9 @@ func (this *KI64Pair) Equal(that interface{}) bool {
|
||||
if this.Value != that1.Value {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (m *KVPair) Marshal() (dAtA []byte, err error) {
|
||||
@ -173,6 +231,9 @@ func (m *KVPair) MarshalTo(dAtA []byte) (int, error) {
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
|
||||
i += copy(dAtA[i:], m.Value)
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
i += copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
@ -202,6 +263,9 @@ func (m *KI64Pair) MarshalTo(dAtA []byte) (int, error) {
|
||||
i++
|
||||
i = encodeVarintTypes(dAtA, i, uint64(m.Value))
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
i += copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
@ -227,6 +291,7 @@ func NewPopulatedKVPair(r randyTypes, easy bool) *KVPair {
|
||||
this.Value[i] = byte(r.Intn(256))
|
||||
}
|
||||
if !easy && r.Intn(10) != 0 {
|
||||
this.XXX_unrecognized = randUnrecognizedTypes(r, 3)
|
||||
}
|
||||
return this
|
||||
}
|
||||
@ -243,6 +308,7 @@ func NewPopulatedKI64Pair(r randyTypes, easy bool) *KI64Pair {
|
||||
this.Value *= -1
|
||||
}
|
||||
if !easy && r.Intn(10) != 0 {
|
||||
this.XXX_unrecognized = randUnrecognizedTypes(r, 3)
|
||||
}
|
||||
return this
|
||||
}
|
||||
@ -330,6 +396,9 @@ func (m *KVPair) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@ -343,6 +412,9 @@ func (m *KI64Pair) Size() (n int) {
|
||||
if m.Value != 0 {
|
||||
n += 1 + sovTypes(uint64(m.Value))
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@ -462,6 +534,7 @@ func (m *KVPair) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
@ -562,6 +635,7 @@ func (m *KI64Pair) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
@ -676,10 +750,12 @@ var (
|
||||
ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
|
||||
)
|
||||
|
||||
func init() { proto.RegisterFile("libs/common/types.proto", fileDescriptorTypes) }
|
||||
func init() { golang_proto.RegisterFile("libs/common/types.proto", fileDescriptorTypes) }
|
||||
func init() { proto.RegisterFile("libs/common/types.proto", fileDescriptor_types_611b4364a8604338) }
|
||||
func init() {
|
||||
golang_proto.RegisterFile("libs/common/types.proto", fileDescriptor_types_611b4364a8604338)
|
||||
}
|
||||
|
||||
var fileDescriptorTypes = []byte{
|
||||
var fileDescriptor_types_611b4364a8604338 = []byte{
|
||||
// 174 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0xc9, 0x4c, 0x2a,
|
||||
0xd6, 0x4f, 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0xd3, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2b, 0x28,
|
||||
|
@ -1,23 +1,14 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: libs/common/types.proto
|
||||
|
||||
/*
|
||||
Package common is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
libs/common/types.proto
|
||||
|
||||
It has these top-level messages:
|
||||
KVPair
|
||||
KI64Pair
|
||||
*/
|
||||
package common
|
||||
|
||||
import testing "testing"
|
||||
import rand "math/rand"
|
||||
import math_rand "math/rand"
|
||||
import time "time"
|
||||
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
|
||||
import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
import golang_proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
@ -31,14 +22,14 @@ var _ = math.Inf
|
||||
|
||||
func TestKVPairProto(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedKVPair(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &KVPair{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
littlefuzz := make([]byte, len(dAtA))
|
||||
@ -56,13 +47,13 @@ func TestKVPairProto(t *testing.T) {
|
||||
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
|
||||
}
|
||||
// shouldn't panic
|
||||
_ = proto.Unmarshal(littlefuzz, msg)
|
||||
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
|
||||
}
|
||||
}
|
||||
|
||||
func TestKVPairMarshalTo(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedKVPair(popr, false)
|
||||
size := p.Size()
|
||||
dAtA := make([]byte, size)
|
||||
@ -74,7 +65,7 @@ func TestKVPairMarshalTo(t *testing.T) {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &KVPair{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
for i := range dAtA {
|
||||
@ -87,14 +78,14 @@ func TestKVPairMarshalTo(t *testing.T) {
|
||||
|
||||
func TestKI64PairProto(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedKI64Pair(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &KI64Pair{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
littlefuzz := make([]byte, len(dAtA))
|
||||
@ -112,13 +103,13 @@ func TestKI64PairProto(t *testing.T) {
|
||||
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
|
||||
}
|
||||
// shouldn't panic
|
||||
_ = proto.Unmarshal(littlefuzz, msg)
|
||||
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
|
||||
}
|
||||
}
|
||||
|
||||
func TestKI64PairMarshalTo(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedKI64Pair(popr, false)
|
||||
size := p.Size()
|
||||
dAtA := make([]byte, size)
|
||||
@ -130,7 +121,7 @@ func TestKI64PairMarshalTo(t *testing.T) {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &KI64Pair{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
for i := range dAtA {
|
||||
@ -143,15 +134,15 @@ func TestKI64PairMarshalTo(t *testing.T) {
|
||||
|
||||
func TestKVPairJSON(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedKVPair(popr, true)
|
||||
marshaler := jsonpb.Marshaler{}
|
||||
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
jsondata, err := marshaler.MarshalToString(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &KVPair{}
|
||||
err = jsonpb.UnmarshalString(jsondata, msg)
|
||||
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@ -161,15 +152,15 @@ func TestKVPairJSON(t *testing.T) {
|
||||
}
|
||||
func TestKI64PairJSON(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedKI64Pair(popr, true)
|
||||
marshaler := jsonpb.Marshaler{}
|
||||
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
jsondata, err := marshaler.MarshalToString(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &KI64Pair{}
|
||||
err = jsonpb.UnmarshalString(jsondata, msg)
|
||||
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@ -179,11 +170,11 @@ func TestKI64PairJSON(t *testing.T) {
|
||||
}
|
||||
func TestKVPairProtoText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedKVPair(popr, true)
|
||||
dAtA := proto.MarshalTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
|
||||
msg := &KVPair{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
if !p.Equal(msg) {
|
||||
@ -193,11 +184,11 @@ func TestKVPairProtoText(t *testing.T) {
|
||||
|
||||
func TestKVPairProtoCompactText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedKVPair(popr, true)
|
||||
dAtA := proto.CompactTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
|
||||
msg := &KVPair{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
if !p.Equal(msg) {
|
||||
@ -207,11 +198,11 @@ func TestKVPairProtoCompactText(t *testing.T) {
|
||||
|
||||
func TestKI64PairProtoText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedKI64Pair(popr, true)
|
||||
dAtA := proto.MarshalTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
|
||||
msg := &KI64Pair{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
if !p.Equal(msg) {
|
||||
@ -221,11 +212,11 @@ func TestKI64PairProtoText(t *testing.T) {
|
||||
|
||||
func TestKI64PairProtoCompactText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedKI64Pair(popr, true)
|
||||
dAtA := proto.CompactTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
|
||||
msg := &KI64Pair{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
if !p.Equal(msg) {
|
||||
@ -235,10 +226,10 @@ func TestKI64PairProtoCompactText(t *testing.T) {
|
||||
|
||||
func TestKVPairSize(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedKVPair(popr, true)
|
||||
size2 := proto.Size(p)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
size2 := github_com_gogo_protobuf_proto.Size(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@ -249,7 +240,7 @@ func TestKVPairSize(t *testing.T) {
|
||||
if size2 != size {
|
||||
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
|
||||
}
|
||||
size3 := proto.Size(p)
|
||||
size3 := github_com_gogo_protobuf_proto.Size(p)
|
||||
if size3 != size {
|
||||
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
|
||||
}
|
||||
@ -257,10 +248,10 @@ func TestKVPairSize(t *testing.T) {
|
||||
|
||||
func TestKI64PairSize(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedKI64Pair(popr, true)
|
||||
size2 := proto.Size(p)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
size2 := github_com_gogo_protobuf_proto.Size(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@ -271,7 +262,7 @@ func TestKI64PairSize(t *testing.T) {
|
||||
if size2 != size {
|
||||
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
|
||||
}
|
||||
size3 := proto.Size(p)
|
||||
size3 := github_com_gogo_protobuf_proto.Size(p)
|
||||
if size3 != size {
|
||||
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ func TestMain(m *testing.M) {
|
||||
|
||||
func TestBroadcastTx(t *testing.T) {
|
||||
require := require.New(t)
|
||||
res, err := rpctest.GetGRPCClient().BroadcastTx(context.Background(), &core_grpc.RequestBroadcastTx{[]byte("this is a tx")})
|
||||
res, err := rpctest.GetGRPCClient().BroadcastTx(context.Background(), &core_grpc.RequestBroadcastTx{Tx: []byte("this is a tx")})
|
||||
require.Nil(err, "%+v", err)
|
||||
require.EqualValues(0, res.CheckTx.Code)
|
||||
require.EqualValues(0, res.DeliverTx.Code)
|
||||
|
@ -1,18 +1,6 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: rpc/grpc/types.proto
|
||||
|
||||
/*
|
||||
Package core_grpc is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
rpc/grpc/types.proto
|
||||
|
||||
It has these top-level messages:
|
||||
RequestPing
|
||||
RequestBroadcastTx
|
||||
ResponsePing
|
||||
ResponseBroadcastTx
|
||||
*/
|
||||
//nolint
|
||||
package core_grpc
|
||||
|
||||
@ -25,8 +13,10 @@ import types "github.com/tendermint/tendermint/abci/types"
|
||||
|
||||
import bytes "bytes"
|
||||
|
||||
import context "golang.org/x/net/context"
|
||||
import grpc "google.golang.org/grpc"
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
||||
grpc "google.golang.org/grpc"
|
||||
)
|
||||
|
||||
import io "io"
|
||||
|
||||
@ -43,21 +33,83 @@ var _ = math.Inf
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type RequestPing struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *RequestPing) Reset() { *m = RequestPing{} }
|
||||
func (m *RequestPing) String() string { return proto.CompactTextString(m) }
|
||||
func (*RequestPing) ProtoMessage() {}
|
||||
func (*RequestPing) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} }
|
||||
func (*RequestPing) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_48bb8d9591d37e66, []int{0}
|
||||
}
|
||||
func (m *RequestPing) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *RequestPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_RequestPing.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalTo(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (dst *RequestPing) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_RequestPing.Merge(dst, src)
|
||||
}
|
||||
func (m *RequestPing) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *RequestPing) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_RequestPing.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_RequestPing proto.InternalMessageInfo
|
||||
|
||||
type RequestBroadcastTx struct {
|
||||
Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *RequestBroadcastTx) Reset() { *m = RequestBroadcastTx{} }
|
||||
func (m *RequestBroadcastTx) String() string { return proto.CompactTextString(m) }
|
||||
func (*RequestBroadcastTx) ProtoMessage() {}
|
||||
func (*RequestBroadcastTx) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} }
|
||||
func (*RequestBroadcastTx) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_48bb8d9591d37e66, []int{1}
|
||||
}
|
||||
func (m *RequestBroadcastTx) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *RequestBroadcastTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_RequestBroadcastTx.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalTo(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (dst *RequestBroadcastTx) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_RequestBroadcastTx.Merge(dst, src)
|
||||
}
|
||||
func (m *RequestBroadcastTx) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *RequestBroadcastTx) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_RequestBroadcastTx.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_RequestBroadcastTx proto.InternalMessageInfo
|
||||
|
||||
func (m *RequestBroadcastTx) GetTx() []byte {
|
||||
if m != nil {
|
||||
@ -67,22 +119,84 @@ func (m *RequestBroadcastTx) GetTx() []byte {
|
||||
}
|
||||
|
||||
type ResponsePing struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ResponsePing) Reset() { *m = ResponsePing{} }
|
||||
func (m *ResponsePing) String() string { return proto.CompactTextString(m) }
|
||||
func (*ResponsePing) ProtoMessage() {}
|
||||
func (*ResponsePing) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{2} }
|
||||
func (*ResponsePing) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_48bb8d9591d37e66, []int{2}
|
||||
}
|
||||
func (m *ResponsePing) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *ResponsePing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_ResponsePing.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalTo(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (dst *ResponsePing) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ResponsePing.Merge(dst, src)
|
||||
}
|
||||
func (m *ResponsePing) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *ResponsePing) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ResponsePing.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ResponsePing proto.InternalMessageInfo
|
||||
|
||||
type ResponseBroadcastTx struct {
|
||||
CheckTx *types.ResponseCheckTx `protobuf:"bytes,1,opt,name=check_tx,json=checkTx" json:"check_tx,omitempty"`
|
||||
DeliverTx *types.ResponseDeliverTx `protobuf:"bytes,2,opt,name=deliver_tx,json=deliverTx" json:"deliver_tx,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ResponseBroadcastTx) Reset() { *m = ResponseBroadcastTx{} }
|
||||
func (m *ResponseBroadcastTx) String() string { return proto.CompactTextString(m) }
|
||||
func (*ResponseBroadcastTx) ProtoMessage() {}
|
||||
func (*ResponseBroadcastTx) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{3} }
|
||||
func (*ResponseBroadcastTx) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_types_48bb8d9591d37e66, []int{3}
|
||||
}
|
||||
func (m *ResponseBroadcastTx) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *ResponseBroadcastTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_ResponseBroadcastTx.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalTo(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (dst *ResponseBroadcastTx) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ResponseBroadcastTx.Merge(dst, src)
|
||||
}
|
||||
func (m *ResponseBroadcastTx) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *ResponseBroadcastTx) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ResponseBroadcastTx.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ResponseBroadcastTx proto.InternalMessageInfo
|
||||
|
||||
func (m *ResponseBroadcastTx) GetCheckTx() *types.ResponseCheckTx {
|
||||
if m != nil {
|
||||
@ -127,6 +241,9 @@ func (this *RequestPing) Equal(that interface{}) bool {
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *RequestBroadcastTx) Equal(that interface{}) bool {
|
||||
@ -151,6 +268,9 @@ func (this *RequestBroadcastTx) Equal(that interface{}) bool {
|
||||
if !bytes.Equal(this.Tx, that1.Tx) {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *ResponsePing) Equal(that interface{}) bool {
|
||||
@ -172,6 +292,9 @@ func (this *ResponsePing) Equal(that interface{}) bool {
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *ResponseBroadcastTx) Equal(that interface{}) bool {
|
||||
@ -199,6 +322,9 @@ func (this *ResponseBroadcastTx) Equal(that interface{}) bool {
|
||||
if !this.DeliverTx.Equal(that1.DeliverTx) {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
@ -210,8 +336,9 @@ var _ grpc.ClientConn
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// Client API for BroadcastAPI service
|
||||
|
||||
// BroadcastAPIClient is the client API for BroadcastAPI service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type BroadcastAPIClient interface {
|
||||
Ping(ctx context.Context, in *RequestPing, opts ...grpc.CallOption) (*ResponsePing, error)
|
||||
BroadcastTx(ctx context.Context, in *RequestBroadcastTx, opts ...grpc.CallOption) (*ResponseBroadcastTx, error)
|
||||
@ -227,7 +354,7 @@ func NewBroadcastAPIClient(cc *grpc.ClientConn) BroadcastAPIClient {
|
||||
|
||||
func (c *broadcastAPIClient) Ping(ctx context.Context, in *RequestPing, opts ...grpc.CallOption) (*ResponsePing, error) {
|
||||
out := new(ResponsePing)
|
||||
err := grpc.Invoke(ctx, "/core_grpc.BroadcastAPI/Ping", in, out, c.cc, opts...)
|
||||
err := c.cc.Invoke(ctx, "/core_grpc.BroadcastAPI/Ping", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -236,7 +363,7 @@ func (c *broadcastAPIClient) Ping(ctx context.Context, in *RequestPing, opts ...
|
||||
|
||||
func (c *broadcastAPIClient) BroadcastTx(ctx context.Context, in *RequestBroadcastTx, opts ...grpc.CallOption) (*ResponseBroadcastTx, error) {
|
||||
out := new(ResponseBroadcastTx)
|
||||
err := grpc.Invoke(ctx, "/core_grpc.BroadcastAPI/BroadcastTx", in, out, c.cc, opts...)
|
||||
err := c.cc.Invoke(ctx, "/core_grpc.BroadcastAPI/BroadcastTx", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -322,6 +449,9 @@ func (m *RequestPing) MarshalTo(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.XXX_unrecognized != nil {
|
||||
i += copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
@ -346,6 +476,9 @@ func (m *RequestBroadcastTx) MarshalTo(dAtA []byte) (int, error) {
|
||||
i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
|
||||
i += copy(dAtA[i:], m.Tx)
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
i += copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
@ -364,6 +497,9 @@ func (m *ResponsePing) MarshalTo(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.XXX_unrecognized != nil {
|
||||
i += copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
@ -402,6 +538,9 @@ func (m *ResponseBroadcastTx) MarshalTo(dAtA []byte) (int, error) {
|
||||
}
|
||||
i += n2
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
i += copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
@ -417,6 +556,7 @@ func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
|
||||
func NewPopulatedRequestPing(r randyTypes, easy bool) *RequestPing {
|
||||
this := &RequestPing{}
|
||||
if !easy && r.Intn(10) != 0 {
|
||||
this.XXX_unrecognized = randUnrecognizedTypes(r, 1)
|
||||
}
|
||||
return this
|
||||
}
|
||||
@ -429,6 +569,7 @@ func NewPopulatedRequestBroadcastTx(r randyTypes, easy bool) *RequestBroadcastTx
|
||||
this.Tx[i] = byte(r.Intn(256))
|
||||
}
|
||||
if !easy && r.Intn(10) != 0 {
|
||||
this.XXX_unrecognized = randUnrecognizedTypes(r, 2)
|
||||
}
|
||||
return this
|
||||
}
|
||||
@ -436,6 +577,7 @@ func NewPopulatedRequestBroadcastTx(r randyTypes, easy bool) *RequestBroadcastTx
|
||||
func NewPopulatedResponsePing(r randyTypes, easy bool) *ResponsePing {
|
||||
this := &ResponsePing{}
|
||||
if !easy && r.Intn(10) != 0 {
|
||||
this.XXX_unrecognized = randUnrecognizedTypes(r, 1)
|
||||
}
|
||||
return this
|
||||
}
|
||||
@ -449,6 +591,7 @@ func NewPopulatedResponseBroadcastTx(r randyTypes, easy bool) *ResponseBroadcast
|
||||
this.DeliverTx = types.NewPopulatedResponseDeliverTx(r, easy)
|
||||
}
|
||||
if !easy && r.Intn(10) != 0 {
|
||||
this.XXX_unrecognized = randUnrecognizedTypes(r, 3)
|
||||
}
|
||||
return this
|
||||
}
|
||||
@ -528,6 +671,9 @@ func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte {
|
||||
func (m *RequestPing) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@ -538,12 +684,18 @@ func (m *RequestBroadcastTx) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ResponsePing) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@ -558,6 +710,9 @@ func (m *ResponseBroadcastTx) Size() (n int) {
|
||||
l = m.DeliverTx.Size()
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@ -615,6 +770,7 @@ func (m *RequestPing) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
@ -696,6 +852,7 @@ func (m *RequestBroadcastTx) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
@ -746,6 +903,7 @@ func (m *ResponsePing) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
@ -862,6 +1020,7 @@ func (m *ResponseBroadcastTx) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
@ -976,10 +1135,10 @@ var (
|
||||
ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
|
||||
)
|
||||
|
||||
func init() { proto.RegisterFile("rpc/grpc/types.proto", fileDescriptorTypes) }
|
||||
func init() { golang_proto.RegisterFile("rpc/grpc/types.proto", fileDescriptorTypes) }
|
||||
func init() { proto.RegisterFile("rpc/grpc/types.proto", fileDescriptor_types_48bb8d9591d37e66) }
|
||||
func init() { golang_proto.RegisterFile("rpc/grpc/types.proto", fileDescriptor_types_48bb8d9591d37e66) }
|
||||
|
||||
var fileDescriptorTypes = []byte{
|
||||
var fileDescriptor_types_48bb8d9591d37e66 = []byte{
|
||||
// 321 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0x2a, 0x48, 0xd6,
|
||||
0x4f, 0x07, 0x11, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c,
|
||||
|
@ -1,25 +1,14 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: rpc/grpc/types.proto
|
||||
|
||||
/*
|
||||
Package core_grpc is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
rpc/grpc/types.proto
|
||||
|
||||
It has these top-level messages:
|
||||
RequestPing
|
||||
RequestBroadcastTx
|
||||
ResponsePing
|
||||
ResponseBroadcastTx
|
||||
*/
|
||||
package core_grpc
|
||||
|
||||
import testing "testing"
|
||||
import rand "math/rand"
|
||||
import math_rand "math/rand"
|
||||
import time "time"
|
||||
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
|
||||
import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
import golang_proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
@ -34,14 +23,14 @@ var _ = math.Inf
|
||||
|
||||
func TestRequestPingProto(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedRequestPing(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &RequestPing{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
littlefuzz := make([]byte, len(dAtA))
|
||||
@ -59,13 +48,13 @@ func TestRequestPingProto(t *testing.T) {
|
||||
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
|
||||
}
|
||||
// shouldn't panic
|
||||
_ = proto.Unmarshal(littlefuzz, msg)
|
||||
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRequestPingMarshalTo(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedRequestPing(popr, false)
|
||||
size := p.Size()
|
||||
dAtA := make([]byte, size)
|
||||
@ -77,7 +66,7 @@ func TestRequestPingMarshalTo(t *testing.T) {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &RequestPing{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
for i := range dAtA {
|
||||
@ -90,14 +79,14 @@ func TestRequestPingMarshalTo(t *testing.T) {
|
||||
|
||||
func TestRequestBroadcastTxProto(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedRequestBroadcastTx(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &RequestBroadcastTx{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
littlefuzz := make([]byte, len(dAtA))
|
||||
@ -115,13 +104,13 @@ func TestRequestBroadcastTxProto(t *testing.T) {
|
||||
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
|
||||
}
|
||||
// shouldn't panic
|
||||
_ = proto.Unmarshal(littlefuzz, msg)
|
||||
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRequestBroadcastTxMarshalTo(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedRequestBroadcastTx(popr, false)
|
||||
size := p.Size()
|
||||
dAtA := make([]byte, size)
|
||||
@ -133,7 +122,7 @@ func TestRequestBroadcastTxMarshalTo(t *testing.T) {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &RequestBroadcastTx{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
for i := range dAtA {
|
||||
@ -146,14 +135,14 @@ func TestRequestBroadcastTxMarshalTo(t *testing.T) {
|
||||
|
||||
func TestResponsePingProto(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedResponsePing(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &ResponsePing{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
littlefuzz := make([]byte, len(dAtA))
|
||||
@ -171,13 +160,13 @@ func TestResponsePingProto(t *testing.T) {
|
||||
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
|
||||
}
|
||||
// shouldn't panic
|
||||
_ = proto.Unmarshal(littlefuzz, msg)
|
||||
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
|
||||
}
|
||||
}
|
||||
|
||||
func TestResponsePingMarshalTo(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedResponsePing(popr, false)
|
||||
size := p.Size()
|
||||
dAtA := make([]byte, size)
|
||||
@ -189,7 +178,7 @@ func TestResponsePingMarshalTo(t *testing.T) {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &ResponsePing{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
for i := range dAtA {
|
||||
@ -202,14 +191,14 @@ func TestResponsePingMarshalTo(t *testing.T) {
|
||||
|
||||
func TestResponseBroadcastTxProto(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedResponseBroadcastTx(popr, false)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &ResponseBroadcastTx{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
littlefuzz := make([]byte, len(dAtA))
|
||||
@ -227,13 +216,13 @@ func TestResponseBroadcastTxProto(t *testing.T) {
|
||||
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
|
||||
}
|
||||
// shouldn't panic
|
||||
_ = proto.Unmarshal(littlefuzz, msg)
|
||||
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
|
||||
}
|
||||
}
|
||||
|
||||
func TestResponseBroadcastTxMarshalTo(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedResponseBroadcastTx(popr, false)
|
||||
size := p.Size()
|
||||
dAtA := make([]byte, size)
|
||||
@ -245,7 +234,7 @@ func TestResponseBroadcastTxMarshalTo(t *testing.T) {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &ResponseBroadcastTx{}
|
||||
if err := proto.Unmarshal(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
for i := range dAtA {
|
||||
@ -258,15 +247,15 @@ func TestResponseBroadcastTxMarshalTo(t *testing.T) {
|
||||
|
||||
func TestRequestPingJSON(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedRequestPing(popr, true)
|
||||
marshaler := jsonpb.Marshaler{}
|
||||
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
jsondata, err := marshaler.MarshalToString(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &RequestPing{}
|
||||
err = jsonpb.UnmarshalString(jsondata, msg)
|
||||
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@ -276,15 +265,15 @@ func TestRequestPingJSON(t *testing.T) {
|
||||
}
|
||||
func TestRequestBroadcastTxJSON(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedRequestBroadcastTx(popr, true)
|
||||
marshaler := jsonpb.Marshaler{}
|
||||
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
jsondata, err := marshaler.MarshalToString(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &RequestBroadcastTx{}
|
||||
err = jsonpb.UnmarshalString(jsondata, msg)
|
||||
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@ -294,15 +283,15 @@ func TestRequestBroadcastTxJSON(t *testing.T) {
|
||||
}
|
||||
func TestResponsePingJSON(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedResponsePing(popr, true)
|
||||
marshaler := jsonpb.Marshaler{}
|
||||
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
jsondata, err := marshaler.MarshalToString(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &ResponsePing{}
|
||||
err = jsonpb.UnmarshalString(jsondata, msg)
|
||||
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@ -312,15 +301,15 @@ func TestResponsePingJSON(t *testing.T) {
|
||||
}
|
||||
func TestResponseBroadcastTxJSON(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedResponseBroadcastTx(popr, true)
|
||||
marshaler := jsonpb.Marshaler{}
|
||||
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
jsondata, err := marshaler.MarshalToString(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
msg := &ResponseBroadcastTx{}
|
||||
err = jsonpb.UnmarshalString(jsondata, msg)
|
||||
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@ -330,11 +319,11 @@ func TestResponseBroadcastTxJSON(t *testing.T) {
|
||||
}
|
||||
func TestRequestPingProtoText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedRequestPing(popr, true)
|
||||
dAtA := proto.MarshalTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
|
||||
msg := &RequestPing{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
if !p.Equal(msg) {
|
||||
@ -344,11 +333,11 @@ func TestRequestPingProtoText(t *testing.T) {
|
||||
|
||||
func TestRequestPingProtoCompactText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedRequestPing(popr, true)
|
||||
dAtA := proto.CompactTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
|
||||
msg := &RequestPing{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
if !p.Equal(msg) {
|
||||
@ -358,11 +347,11 @@ func TestRequestPingProtoCompactText(t *testing.T) {
|
||||
|
||||
func TestRequestBroadcastTxProtoText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedRequestBroadcastTx(popr, true)
|
||||
dAtA := proto.MarshalTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
|
||||
msg := &RequestBroadcastTx{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
if !p.Equal(msg) {
|
||||
@ -372,11 +361,11 @@ func TestRequestBroadcastTxProtoText(t *testing.T) {
|
||||
|
||||
func TestRequestBroadcastTxProtoCompactText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedRequestBroadcastTx(popr, true)
|
||||
dAtA := proto.CompactTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
|
||||
msg := &RequestBroadcastTx{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
if !p.Equal(msg) {
|
||||
@ -386,11 +375,11 @@ func TestRequestBroadcastTxProtoCompactText(t *testing.T) {
|
||||
|
||||
func TestResponsePingProtoText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedResponsePing(popr, true)
|
||||
dAtA := proto.MarshalTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
|
||||
msg := &ResponsePing{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
if !p.Equal(msg) {
|
||||
@ -400,11 +389,11 @@ func TestResponsePingProtoText(t *testing.T) {
|
||||
|
||||
func TestResponsePingProtoCompactText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedResponsePing(popr, true)
|
||||
dAtA := proto.CompactTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
|
||||
msg := &ResponsePing{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
if !p.Equal(msg) {
|
||||
@ -414,11 +403,11 @@ func TestResponsePingProtoCompactText(t *testing.T) {
|
||||
|
||||
func TestResponseBroadcastTxProtoText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedResponseBroadcastTx(popr, true)
|
||||
dAtA := proto.MarshalTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
|
||||
msg := &ResponseBroadcastTx{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
if !p.Equal(msg) {
|
||||
@ -428,11 +417,11 @@ func TestResponseBroadcastTxProtoText(t *testing.T) {
|
||||
|
||||
func TestResponseBroadcastTxProtoCompactText(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedResponseBroadcastTx(popr, true)
|
||||
dAtA := proto.CompactTextString(p)
|
||||
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
|
||||
msg := &ResponseBroadcastTx{}
|
||||
if err := proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
if !p.Equal(msg) {
|
||||
@ -442,10 +431,10 @@ func TestResponseBroadcastTxProtoCompactText(t *testing.T) {
|
||||
|
||||
func TestRequestPingSize(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedRequestPing(popr, true)
|
||||
size2 := proto.Size(p)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
size2 := github_com_gogo_protobuf_proto.Size(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@ -456,7 +445,7 @@ func TestRequestPingSize(t *testing.T) {
|
||||
if size2 != size {
|
||||
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
|
||||
}
|
||||
size3 := proto.Size(p)
|
||||
size3 := github_com_gogo_protobuf_proto.Size(p)
|
||||
if size3 != size {
|
||||
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
|
||||
}
|
||||
@ -464,10 +453,10 @@ func TestRequestPingSize(t *testing.T) {
|
||||
|
||||
func TestRequestBroadcastTxSize(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedRequestBroadcastTx(popr, true)
|
||||
size2 := proto.Size(p)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
size2 := github_com_gogo_protobuf_proto.Size(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@ -478,7 +467,7 @@ func TestRequestBroadcastTxSize(t *testing.T) {
|
||||
if size2 != size {
|
||||
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
|
||||
}
|
||||
size3 := proto.Size(p)
|
||||
size3 := github_com_gogo_protobuf_proto.Size(p)
|
||||
if size3 != size {
|
||||
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
|
||||
}
|
||||
@ -486,10 +475,10 @@ func TestRequestBroadcastTxSize(t *testing.T) {
|
||||
|
||||
func TestResponsePingSize(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedResponsePing(popr, true)
|
||||
size2 := proto.Size(p)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
size2 := github_com_gogo_protobuf_proto.Size(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@ -500,7 +489,7 @@ func TestResponsePingSize(t *testing.T) {
|
||||
if size2 != size {
|
||||
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
|
||||
}
|
||||
size3 := proto.Size(p)
|
||||
size3 := github_com_gogo_protobuf_proto.Size(p)
|
||||
if size3 != size {
|
||||
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
|
||||
}
|
||||
@ -508,10 +497,10 @@ func TestResponsePingSize(t *testing.T) {
|
||||
|
||||
func TestResponseBroadcastTxSize(t *testing.T) {
|
||||
seed := time.Now().UnixNano()
|
||||
popr := rand.New(rand.NewSource(seed))
|
||||
popr := math_rand.New(math_rand.NewSource(seed))
|
||||
p := NewPopulatedResponseBroadcastTx(popr, true)
|
||||
size2 := proto.Size(p)
|
||||
dAtA, err := proto.Marshal(p)
|
||||
size2 := github_com_gogo_protobuf_proto.Size(p)
|
||||
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
|
||||
if err != nil {
|
||||
t.Fatalf("seed = %d, err = %v", seed, err)
|
||||
}
|
||||
@ -522,7 +511,7 @@ func TestResponseBroadcastTxSize(t *testing.T) {
|
||||
if size2 != size {
|
||||
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
|
||||
}
|
||||
size3 := proto.Size(p)
|
||||
size3 := github_com_gogo_protobuf_proto.Size(p)
|
||||
if size3 != size {
|
||||
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
|
||||
}
|
||||
|
@ -119,8 +119,8 @@ func TestABCIResponsesSaveLoad2(t *testing.T) {
|
||||
{Code: 383},
|
||||
{Data: []byte("Gotcha!"),
|
||||
Tags: []cmn.KVPair{
|
||||
cmn.KVPair{[]byte("a"), []byte("1")},
|
||||
cmn.KVPair{[]byte("build"), []byte("stuff")},
|
||||
cmn.KVPair{Key: []byte("a"), Value: []byte("1")},
|
||||
cmn.KVPair{Key: []byte("build"), Value: []byte("stuff")},
|
||||
}},
|
||||
},
|
||||
types.ABCIResults{
|
||||
|
@ -156,8 +156,8 @@ func TestIndexAllTags(t *testing.T) {
|
||||
indexer := NewTxIndex(db.NewMemDB(), IndexAllTags())
|
||||
|
||||
txResult := txResultWithTags([]cmn.KVPair{
|
||||
cmn.KVPair{[]byte("account.owner"), []byte("Ivan")},
|
||||
cmn.KVPair{[]byte("account.number"), []byte("1")},
|
||||
cmn.KVPair{Key: []byte("account.owner"), Value: []byte("Ivan")},
|
||||
cmn.KVPair{Key: []byte("account.number"), Value: []byte("1")},
|
||||
})
|
||||
|
||||
err := indexer.Index(txResult)
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/tendermint/go-amino"
|
||||
"github.com/tendermint/tendermint/rpc/grpc"
|
||||
amino "github.com/tendermint/go-amino"
|
||||
core_grpc "github.com/tendermint/tendermint/rpc/grpc"
|
||||
)
|
||||
|
||||
var grpcAddr = "tcp://localhost:36656"
|
||||
@ -27,7 +27,7 @@ func main() {
|
||||
}
|
||||
|
||||
clientGRPC := core_grpc.StartGRPCClient(grpcAddr)
|
||||
res, err := clientGRPC.BroadcastTx(context.Background(), &core_grpc.RequestBroadcastTx{txBytes})
|
||||
res, err := clientGRPC.BroadcastTx(context.Background(), &core_grpc.RequestBroadcastTx{Tx: txBytes})
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
|
@ -22,7 +22,7 @@ func TestEventBusPublishEventTx(t *testing.T) {
|
||||
defer eventBus.Stop()
|
||||
|
||||
tx := Tx("foo")
|
||||
result := abci.ResponseDeliverTx{Data: []byte("bar"), Tags: []cmn.KVPair{{[]byte("baz"), []byte("1")}}}
|
||||
result := abci.ResponseDeliverTx{Data: []byte("bar"), Tags: []cmn.KVPair{{Key: []byte("baz"), Value: []byte("1")}}}
|
||||
|
||||
txEventsCh := make(chan interface{})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user