mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-18 13:16:25 +00:00
Small fixes
This commit is contained in:
@@ -78,7 +78,7 @@ func (sm *StateMachine) CheckTx(req types.RequestCheckTx) types.ResponseCheckTx
|
||||
}
|
||||
|
||||
// check if account exists
|
||||
if _, ok := sm.accounts[m.MsgBid.AccountId]; !ok {
|
||||
if _, ok := sm.accounts[m.MsgBid.BidOrder.OwnerId]; !ok {
|
||||
return types.ResponseCheckTx{Code: 4}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ func (sm *StateMachine) CheckTx(req types.RequestCheckTx) types.ResponseCheckTx
|
||||
}
|
||||
|
||||
// check if account exists
|
||||
if _, ok := sm.accounts[m.MsgAsk.AccountId]; !ok {
|
||||
if _, ok := sm.accounts[m.MsgAsk.AskOrder.Owner]; !ok {
|
||||
return types.ResponseCheckTx{Code: 4}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ func (sm *StateMachine) CheckTx(req types.RequestCheckTx) types.ResponseCheckTx
|
||||
}
|
||||
|
||||
// check the account has a enough quantity
|
||||
if err := m.MsgAsk.Quantity >= sm.commodities[m.MsgAsk.Pair.OutboundCommodityDenom].Quantity; !ok {
|
||||
if err := m.MsgAsk.AskOrder.Quantity >= sm.commodities[m.MsgAsk.Pair.SellersDenomination].Quantity; !ok {
|
||||
return types.ResponseCheckTx{Code: 4, Log: err.Error()}
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ func (sm *StateMachine) ProcessProposal(req types.RequestProcessProposal) types.
|
||||
}
|
||||
|
||||
func (msg *MsgBid) ValidateBasic() error {
|
||||
if err := msg.Order.ValidateBasic(); err != nil {
|
||||
if err := msg.BidOrder.ValidateBasic(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ func (msg *MsgBid) ValidateBasic() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(msg.Signature) != ed25519.SignatureSize {
|
||||
if len(msg.BidOrder.Signature) != ed25519.SignatureSize {
|
||||
return errors.New("invalid signature size")
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ func (msg *MsgBid) ValidateBasic() error {
|
||||
}
|
||||
|
||||
func (msg *MsgAsk) ValidateBasic() error {
|
||||
if err := msg.Order.ValidateBasic(); err != nil {
|
||||
if err := msg.AskOrder.ValidateBasic(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ func (msg *MsgAsk) ValidateBasic() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(msg.Signature) != ed25519.SignatureSize {
|
||||
if len(msg.AskOrder.Signature) != ed25519.SignatureSize {
|
||||
return errors.New("invalid signature size")
|
||||
}
|
||||
|
||||
@@ -262,11 +262,11 @@ func (c *Commodity) ValidateBasic() error {
|
||||
}
|
||||
|
||||
func (p *Pair) ValidateBasic() error {
|
||||
if p.InboundCommodityDenom == "" || p.OutboundCommodityDenom == "" {
|
||||
if p.BuyersDenomination == "" || p.SellersDenomination == "" {
|
||||
return errors.New("inbound and outbound commodities must be present")
|
||||
}
|
||||
|
||||
if p.InboundCommodityDenom == p.OutboundCommodityDenom {
|
||||
if p.BuyersDenomination == p.SellersDenomination {
|
||||
return errors.New("commodities must not be the same")
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ func (p *Pair) ValidateBasic() error {
|
||||
}
|
||||
|
||||
func (o *OrderBid) ValidateBasic() error {
|
||||
if o.Quantity == 0 {
|
||||
if o.MaxQuantity == 0 {
|
||||
return errors.New("quantity outbound must be non zero")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.18.1
|
||||
// protoc v3.21.7
|
||||
// source: msgs.proto
|
||||
|
||||
package orderbook
|
||||
@@ -237,10 +237,9 @@ type Msg struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// a Msg has to be one of the below
|
||||
//a Msg has to be one of the below
|
||||
//
|
||||
// Types that are assignable to Sum:
|
||||
//
|
||||
// *Msg_MsgBid
|
||||
// *Msg_MsgAsk
|
||||
// *Msg_MsgRegisterPair
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.18.1
|
||||
// protoc v3.21.7
|
||||
// source: wire.proto
|
||||
|
||||
package orderbook
|
||||
@@ -27,7 +27,7 @@ type OrderAsk struct {
|
||||
|
||||
Quantity float64 `protobuf:"fixed64,1,opt,name=quantity,proto3" json:"quantity,omitempty"`
|
||||
AskPrice float64 `protobuf:"fixed64,2,opt,name=ask_price,json=askPrice,proto3" json:"ask_price,omitempty"`
|
||||
Owner uint64 `protobuf:"varint,3,opt,name=owner,proto3" json:"owner,omitempty"`
|
||||
OwnerId uint64 `protobuf:"varint,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
|
||||
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
}
|
||||
|
||||
@@ -77,9 +77,9 @@ func (x *OrderAsk) GetAskPrice() float64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *OrderAsk) GetOwner() uint64 {
|
||||
func (x *OrderAsk) GetOwnerId() uint64 {
|
||||
if x != nil {
|
||||
return x.Owner
|
||||
return x.OwnerId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -98,7 +98,7 @@ type OrderBid struct {
|
||||
|
||||
MaxQuantity float64 `protobuf:"fixed64,1,opt,name=max_quantity,json=maxQuantity,proto3" json:"max_quantity,omitempty"`
|
||||
MaxPrice float64 `protobuf:"fixed64,2,opt,name=max_price,json=maxPrice,proto3" json:"max_price,omitempty"`
|
||||
Owner uint64 `protobuf:"varint,3,opt,name=owner,proto3" json:"owner,omitempty"`
|
||||
OwnerId uint64 `protobuf:"varint,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
|
||||
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
}
|
||||
|
||||
@@ -148,9 +148,9 @@ func (x *OrderBid) GetMaxPrice() float64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *OrderBid) GetOwner() uint64 {
|
||||
func (x *OrderBid) GetOwnerId() uint64 {
|
||||
if x != nil {
|
||||
return x.Owner
|
||||
return x.OwnerId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -455,59 +455,60 @@ var File_wire_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_wire_proto_rawDesc = []byte{
|
||||
0x0a, 0x0a, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72,
|
||||
0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x22, 0x77, 0x0a, 0x08, 0x4f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x22, 0x7c, 0x0a, 0x08, 0x4f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x41, 0x73, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12,
|
||||
0x1b, 0x0a, 0x09, 0x61, 0x73, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x01, 0x52, 0x08, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6f, 0x77, 0x6e,
|
||||
0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
|
||||
0x22, 0x7e, 0x0a, 0x08, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c,
|
||||
0x6d, 0x61, 0x78, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12,
|
||||
0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x01, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6f, 0x77, 0x6e,
|
||||
0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
|
||||
0x22, 0x6a, 0x0a, 0x04, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2f, 0x0a, 0x13, 0x62, 0x75, 0x79, 0x65,
|
||||
0x72, 0x73, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x62, 0x75, 0x79, 0x65, 0x72, 0x73, 0x44, 0x65, 0x6e,
|
||||
0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x14, 0x73, 0x65, 0x6c,
|
||||
0x6c, 0x65, 0x72, 0x73, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x73,
|
||||
0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3d, 0x0a, 0x09,
|
||||
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x64, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e,
|
||||
0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x01, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x76, 0x0a, 0x07, 0x41,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x0a,
|
||||
0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c,
|
||||
0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x0b, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x64, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x14, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x43, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x64, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x64, 0x69, 0x74,
|
||||
0x69, 0x65, 0x73, 0x22, 0x6f, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x64, 0x65, 0x53, 0x65, 0x74, 0x12,
|
||||
0x23, 0x0a, 0x04, 0x70, 0x61, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
|
||||
0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x50, 0x61, 0x69, 0x72, 0x52, 0x04,
|
||||
0x70, 0x61, 0x69, 0x72, 0x12, 0x3e, 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f,
|
||||
0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64,
|
||||
0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x4f, 0x72,
|
||||
0x64, 0x65, 0x72, 0x73, 0x22, 0x72, 0x0a, 0x0c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x4f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x73,
|
||||
0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62,
|
||||
0x6f, 0x6f, 0x6b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x73, 0x6b, 0x52, 0x08, 0x6f, 0x72,
|
||||
0x64, 0x65, 0x72, 0x41, 0x73, 0x6b, 0x12, 0x30, 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f,
|
||||
0x62, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x72, 0x64, 0x65,
|
||||
0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x52, 0x08,
|
||||
0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e,
|
||||
0x74, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x61, 0x62, 0x63,
|
||||
0x69, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62,
|
||||
0x6f, 0x6f, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x28, 0x01, 0x52, 0x08, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x08,
|
||||
0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07,
|
||||
0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61,
|
||||
0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e,
|
||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x08, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42,
|
||||
0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69,
|
||||
0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x51, 0x75, 0x61,
|
||||
0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69,
|
||||
0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69,
|
||||
0x63, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c,
|
||||
0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x6a, 0x0a, 0x04, 0x50,
|
||||
0x61, 0x69, 0x72, 0x12, 0x2f, 0x0a, 0x13, 0x62, 0x75, 0x79, 0x65, 0x72, 0x73, 0x5f, 0x64, 0x65,
|
||||
0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x12, 0x62, 0x75, 0x79, 0x65, 0x72, 0x73, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x14, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x73, 0x5f,
|
||||
0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x6c, 0x6c, 0x65, 0x72, 0x73, 0x44, 0x65, 0x6e, 0x6f, 0x6d,
|
||||
0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3d, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||
0x64, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75,
|
||||
0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x71, 0x75,
|
||||
0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x76, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
|
||||
0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69,
|
||||
0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62,
|
||||
0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x64,
|
||||
0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x72,
|
||||
0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x64, 0x69, 0x74,
|
||||
0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x64, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x6f,
|
||||
0x0a, 0x08, 0x54, 0x72, 0x61, 0x64, 0x65, 0x53, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x04, 0x70, 0x61,
|
||||
0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x50, 0x61, 0x69, 0x72, 0x52, 0x04, 0x70, 0x61, 0x69, 0x72, 0x12,
|
||||
0x3e, 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62,
|
||||
0x6f, 0x6f, 0x6b, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x52, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22,
|
||||
0x72, 0x0a, 0x0c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12,
|
||||
0x30, 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x4f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x41, 0x73, 0x6b, 0x52, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x73,
|
||||
0x6b, 0x12, 0x30, 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x69, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b,
|
||||
0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x52, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x42, 0x69, 0x64, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x65, 0x6e,
|
||||
0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x2f, 0x65, 0x78, 0x61,
|
||||
0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x6f, 0x6f, 0x6b, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -7,14 +7,14 @@ option go_package = "github.com/tendermint/tendermint/abci/example/orderbook";
|
||||
message OrderAsk {
|
||||
double quantity = 1;
|
||||
double ask_price = 2;
|
||||
uint64 owner = 3;
|
||||
uint64 owner_id = 3;
|
||||
bytes signature = 4;
|
||||
}
|
||||
|
||||
message OrderBid {
|
||||
double max_quantity = 1;
|
||||
double max_price = 2;
|
||||
uint64 owner = 3;
|
||||
uint64 owner_id = 3;
|
||||
bytes signature = 4;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user