You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

485 lines
16 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: proto/types/params.proto
  3. package types
  4. import (
  5. bytes "bytes"
  6. fmt "fmt"
  7. _ "github.com/gogo/protobuf/gogoproto"
  8. proto "github.com/gogo/protobuf/proto"
  9. github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
  10. _ "github.com/golang/protobuf/ptypes/duration"
  11. math "math"
  12. time "time"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var _ = proto.Marshal
  16. var _ = fmt.Errorf
  17. var _ = math.Inf
  18. var _ = time.Kitchen
  19. // This is a compile-time assertion to ensure that this generated file
  20. // is compatible with the proto package it is being compiled against.
  21. // A compilation error at this line likely means your copy of the
  22. // proto package needs to be updated.
  23. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  24. // ConsensusParams contains consensus critical parameters that determine the
  25. // validity of blocks.
  26. type ConsensusParams struct {
  27. Block BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block"`
  28. Evidence EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence"`
  29. Validator ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator"`
  30. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  31. XXX_unrecognized []byte `json:"-"`
  32. XXX_sizecache int32 `json:"-"`
  33. }
  34. func (m *ConsensusParams) Reset() { *m = ConsensusParams{} }
  35. func (m *ConsensusParams) String() string { return proto.CompactTextString(m) }
  36. func (*ConsensusParams) ProtoMessage() {}
  37. func (*ConsensusParams) Descriptor() ([]byte, []int) {
  38. return fileDescriptor_95a9f934fa6f056c, []int{0}
  39. }
  40. func (m *ConsensusParams) XXX_Unmarshal(b []byte) error {
  41. return xxx_messageInfo_ConsensusParams.Unmarshal(m, b)
  42. }
  43. func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  44. return xxx_messageInfo_ConsensusParams.Marshal(b, m, deterministic)
  45. }
  46. func (m *ConsensusParams) XXX_Merge(src proto.Message) {
  47. xxx_messageInfo_ConsensusParams.Merge(m, src)
  48. }
  49. func (m *ConsensusParams) XXX_Size() int {
  50. return xxx_messageInfo_ConsensusParams.Size(m)
  51. }
  52. func (m *ConsensusParams) XXX_DiscardUnknown() {
  53. xxx_messageInfo_ConsensusParams.DiscardUnknown(m)
  54. }
  55. var xxx_messageInfo_ConsensusParams proto.InternalMessageInfo
  56. func (m *ConsensusParams) GetBlock() BlockParams {
  57. if m != nil {
  58. return m.Block
  59. }
  60. return BlockParams{}
  61. }
  62. func (m *ConsensusParams) GetEvidence() EvidenceParams {
  63. if m != nil {
  64. return m.Evidence
  65. }
  66. return EvidenceParams{}
  67. }
  68. func (m *ConsensusParams) GetValidator() ValidatorParams {
  69. if m != nil {
  70. return m.Validator
  71. }
  72. return ValidatorParams{}
  73. }
  74. // BlockParams contains limits on the block size.
  75. type BlockParams struct {
  76. // Note: must be greater than 0
  77. MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
  78. // Note: must be greater or equal to -1
  79. MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"`
  80. // Minimum time increment between consecutive blocks (in milliseconds)
  81. // Not exposed to the application.
  82. TimeIotaMs int64 `protobuf:"varint,3,opt,name=time_iota_ms,json=timeIotaMs,proto3" json:"time_iota_ms,omitempty"`
  83. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  84. XXX_unrecognized []byte `json:"-"`
  85. XXX_sizecache int32 `json:"-"`
  86. }
  87. func (m *BlockParams) Reset() { *m = BlockParams{} }
  88. func (m *BlockParams) String() string { return proto.CompactTextString(m) }
  89. func (*BlockParams) ProtoMessage() {}
  90. func (*BlockParams) Descriptor() ([]byte, []int) {
  91. return fileDescriptor_95a9f934fa6f056c, []int{1}
  92. }
  93. func (m *BlockParams) XXX_Unmarshal(b []byte) error {
  94. return xxx_messageInfo_BlockParams.Unmarshal(m, b)
  95. }
  96. func (m *BlockParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  97. return xxx_messageInfo_BlockParams.Marshal(b, m, deterministic)
  98. }
  99. func (m *BlockParams) XXX_Merge(src proto.Message) {
  100. xxx_messageInfo_BlockParams.Merge(m, src)
  101. }
  102. func (m *BlockParams) XXX_Size() int {
  103. return xxx_messageInfo_BlockParams.Size(m)
  104. }
  105. func (m *BlockParams) XXX_DiscardUnknown() {
  106. xxx_messageInfo_BlockParams.DiscardUnknown(m)
  107. }
  108. var xxx_messageInfo_BlockParams proto.InternalMessageInfo
  109. func (m *BlockParams) GetMaxBytes() int64 {
  110. if m != nil {
  111. return m.MaxBytes
  112. }
  113. return 0
  114. }
  115. func (m *BlockParams) GetMaxGas() int64 {
  116. if m != nil {
  117. return m.MaxGas
  118. }
  119. return 0
  120. }
  121. func (m *BlockParams) GetTimeIotaMs() int64 {
  122. if m != nil {
  123. return m.TimeIotaMs
  124. }
  125. return 0
  126. }
  127. // EvidenceParams determine how we handle evidence of malfeasance.
  128. type EvidenceParams struct {
  129. // Note: must be greater than 0
  130. MaxAgeNumBlocks int64 `protobuf:"varint,1,opt,name=max_age_num_blocks,json=maxAgeNumBlocks,proto3" json:"max_age_num_blocks,omitempty"`
  131. MaxAgeDuration time.Duration `protobuf:"bytes,2,opt,name=max_age_duration,json=maxAgeDuration,proto3,stdduration" json:"max_age_duration"`
  132. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  133. XXX_unrecognized []byte `json:"-"`
  134. XXX_sizecache int32 `json:"-"`
  135. }
  136. func (m *EvidenceParams) Reset() { *m = EvidenceParams{} }
  137. func (m *EvidenceParams) String() string { return proto.CompactTextString(m) }
  138. func (*EvidenceParams) ProtoMessage() {}
  139. func (*EvidenceParams) Descriptor() ([]byte, []int) {
  140. return fileDescriptor_95a9f934fa6f056c, []int{2}
  141. }
  142. func (m *EvidenceParams) XXX_Unmarshal(b []byte) error {
  143. return xxx_messageInfo_EvidenceParams.Unmarshal(m, b)
  144. }
  145. func (m *EvidenceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  146. return xxx_messageInfo_EvidenceParams.Marshal(b, m, deterministic)
  147. }
  148. func (m *EvidenceParams) XXX_Merge(src proto.Message) {
  149. xxx_messageInfo_EvidenceParams.Merge(m, src)
  150. }
  151. func (m *EvidenceParams) XXX_Size() int {
  152. return xxx_messageInfo_EvidenceParams.Size(m)
  153. }
  154. func (m *EvidenceParams) XXX_DiscardUnknown() {
  155. xxx_messageInfo_EvidenceParams.DiscardUnknown(m)
  156. }
  157. var xxx_messageInfo_EvidenceParams proto.InternalMessageInfo
  158. func (m *EvidenceParams) GetMaxAgeNumBlocks() int64 {
  159. if m != nil {
  160. return m.MaxAgeNumBlocks
  161. }
  162. return 0
  163. }
  164. func (m *EvidenceParams) GetMaxAgeDuration() time.Duration {
  165. if m != nil {
  166. return m.MaxAgeDuration
  167. }
  168. return 0
  169. }
  170. // ValidatorParams restrict the public key types validators can use.
  171. // NOTE: uses ABCI pubkey naming, not Amino names.
  172. type ValidatorParams struct {
  173. PubKeyTypes []string `protobuf:"bytes,1,rep,name=pub_key_types,json=pubKeyTypes,proto3" json:"pub_key_types,omitempty"`
  174. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  175. XXX_unrecognized []byte `json:"-"`
  176. XXX_sizecache int32 `json:"-"`
  177. }
  178. func (m *ValidatorParams) Reset() { *m = ValidatorParams{} }
  179. func (m *ValidatorParams) String() string { return proto.CompactTextString(m) }
  180. func (*ValidatorParams) ProtoMessage() {}
  181. func (*ValidatorParams) Descriptor() ([]byte, []int) {
  182. return fileDescriptor_95a9f934fa6f056c, []int{3}
  183. }
  184. func (m *ValidatorParams) XXX_Unmarshal(b []byte) error {
  185. return xxx_messageInfo_ValidatorParams.Unmarshal(m, b)
  186. }
  187. func (m *ValidatorParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  188. return xxx_messageInfo_ValidatorParams.Marshal(b, m, deterministic)
  189. }
  190. func (m *ValidatorParams) XXX_Merge(src proto.Message) {
  191. xxx_messageInfo_ValidatorParams.Merge(m, src)
  192. }
  193. func (m *ValidatorParams) XXX_Size() int {
  194. return xxx_messageInfo_ValidatorParams.Size(m)
  195. }
  196. func (m *ValidatorParams) XXX_DiscardUnknown() {
  197. xxx_messageInfo_ValidatorParams.DiscardUnknown(m)
  198. }
  199. var xxx_messageInfo_ValidatorParams proto.InternalMessageInfo
  200. func (m *ValidatorParams) GetPubKeyTypes() []string {
  201. if m != nil {
  202. return m.PubKeyTypes
  203. }
  204. return nil
  205. }
  206. // HashedParams is a subset of ConsensusParams.
  207. // It is amino encoded and hashed into
  208. // the Header.ConsensusHash.
  209. type HashedParams struct {
  210. BlockMaxBytes int64 `protobuf:"varint,1,opt,name=block_max_bytes,json=blockMaxBytes,proto3" json:"block_max_bytes,omitempty"`
  211. BlockMaxGas int64 `protobuf:"varint,2,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"`
  212. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  213. XXX_unrecognized []byte `json:"-"`
  214. XXX_sizecache int32 `json:"-"`
  215. }
  216. func (m *HashedParams) Reset() { *m = HashedParams{} }
  217. func (m *HashedParams) String() string { return proto.CompactTextString(m) }
  218. func (*HashedParams) ProtoMessage() {}
  219. func (*HashedParams) Descriptor() ([]byte, []int) {
  220. return fileDescriptor_95a9f934fa6f056c, []int{4}
  221. }
  222. func (m *HashedParams) XXX_Unmarshal(b []byte) error {
  223. return xxx_messageInfo_HashedParams.Unmarshal(m, b)
  224. }
  225. func (m *HashedParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  226. return xxx_messageInfo_HashedParams.Marshal(b, m, deterministic)
  227. }
  228. func (m *HashedParams) XXX_Merge(src proto.Message) {
  229. xxx_messageInfo_HashedParams.Merge(m, src)
  230. }
  231. func (m *HashedParams) XXX_Size() int {
  232. return xxx_messageInfo_HashedParams.Size(m)
  233. }
  234. func (m *HashedParams) XXX_DiscardUnknown() {
  235. xxx_messageInfo_HashedParams.DiscardUnknown(m)
  236. }
  237. var xxx_messageInfo_HashedParams proto.InternalMessageInfo
  238. func (m *HashedParams) GetBlockMaxBytes() int64 {
  239. if m != nil {
  240. return m.BlockMaxBytes
  241. }
  242. return 0
  243. }
  244. func (m *HashedParams) GetBlockMaxGas() int64 {
  245. if m != nil {
  246. return m.BlockMaxGas
  247. }
  248. return 0
  249. }
  250. func init() {
  251. proto.RegisterType((*ConsensusParams)(nil), "tendermint.proto.types.ConsensusParams")
  252. proto.RegisterType((*BlockParams)(nil), "tendermint.proto.types.BlockParams")
  253. proto.RegisterType((*EvidenceParams)(nil), "tendermint.proto.types.EvidenceParams")
  254. proto.RegisterType((*ValidatorParams)(nil), "tendermint.proto.types.ValidatorParams")
  255. proto.RegisterType((*HashedParams)(nil), "tendermint.proto.types.HashedParams")
  256. }
  257. func init() { proto.RegisterFile("proto/types/params.proto", fileDescriptor_95a9f934fa6f056c) }
  258. var fileDescriptor_95a9f934fa6f056c = []byte{
  259. // 465 bytes of a gzipped FileDescriptorProto
  260. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0xd1, 0x6e, 0xd3, 0x30,
  261. 0x14, 0x25, 0x04, 0x46, 0x7b, 0xbb, 0xae, 0xc8, 0x0f, 0x10, 0x86, 0x44, 0xab, 0x20, 0x95, 0x49,
  262. 0x20, 0x47, 0x82, 0x37, 0x5e, 0x26, 0x02, 0x68, 0x43, 0x53, 0x11, 0x8a, 0x10, 0x0f, 0x7b, 0xb1,
  263. 0x6e, 0x1a, 0x93, 0x46, 0xab, 0xe3, 0x28, 0x76, 0xa6, 0xe6, 0x47, 0x10, 0x8f, 0xfb, 0x0c, 0x3e,
  264. 0x81, 0xaf, 0x80, 0x57, 0xf8, 0x0b, 0x14, 0xbb, 0x21, 0xed, 0xb4, 0xbe, 0xd9, 0xf7, 0x9e, 0x73,
  265. 0x7c, 0xcf, 0xb9, 0x32, 0x78, 0x45, 0x29, 0xb5, 0x0c, 0x74, 0x5d, 0x70, 0x15, 0x14, 0x58, 0xa2,
  266. 0x50, 0xd4, 0x94, 0xc8, 0x03, 0xcd, 0xf3, 0x84, 0x97, 0x22, 0xcb, 0xb5, 0xad, 0x50, 0x03, 0x3a,
  267. 0x9c, 0xea, 0x45, 0x56, 0x26, 0xac, 0xc0, 0x52, 0xd7, 0x81, 0x65, 0xa7, 0x32, 0x95, 0xdd, 0xc9,
  268. 0xa2, 0x0f, 0x9f, 0xa4, 0x52, 0xa6, 0x4b, 0x6e, 0x21, 0x71, 0xf5, 0x35, 0x48, 0xaa, 0x12, 0x75,
  269. 0x26, 0x73, 0xdb, 0xf7, 0xff, 0x3a, 0x30, 0x7a, 0x2b, 0x73, 0xc5, 0x73, 0x55, 0xa9, 0x4f, 0xe6,
  270. 0x65, 0x72, 0x0c, 0x77, 0xe3, 0xa5, 0x9c, 0x5f, 0x78, 0xce, 0xc4, 0x39, 0x1a, 0xbc, 0x7c, 0x4a,
  271. 0x6f, 0x9e, 0x81, 0x86, 0x0d, 0xc8, 0x72, 0xc2, 0x3b, 0x3f, 0x7f, 0x8d, 0x6f, 0x45, 0x96, 0x47,
  272. 0x4e, 0xa1, 0xc7, 0x2f, 0xb3, 0x84, 0xe7, 0x73, 0xee, 0xdd, 0x36, 0x1a, 0xd3, 0x5d, 0x1a, 0xef,
  273. 0xd7, 0xb8, 0x2d, 0x99, 0xff, 0x6c, 0x72, 0x06, 0xfd, 0x4b, 0x5c, 0x66, 0x09, 0x6a, 0x59, 0x7a,
  274. 0xae, 0x91, 0x7a, 0xb6, 0x4b, 0xea, 0x4b, 0x0b, 0xdc, 0xd2, 0xea, 0xf8, 0x3e, 0x87, 0xc1, 0xc6,
  275. 0xc8, 0xe4, 0x31, 0xf4, 0x05, 0xae, 0x58, 0x5c, 0x6b, 0xae, 0x8c, 0x55, 0x37, 0xea, 0x09, 0x5c,
  276. 0x85, 0xcd, 0x9d, 0x3c, 0x84, 0x7b, 0x4d, 0x33, 0x45, 0x65, 0x1c, 0xb8, 0xd1, 0x9e, 0xc0, 0xd5,
  277. 0x09, 0x2a, 0x32, 0x81, 0x7d, 0x9d, 0x09, 0xce, 0x32, 0xa9, 0x91, 0x09, 0x65, 0x86, 0x72, 0x23,
  278. 0x68, 0x6a, 0x1f, 0xa4, 0xc6, 0x99, 0xf2, 0xbf, 0x39, 0x70, 0xb0, 0x6d, 0x8b, 0x3c, 0x07, 0xd2,
  279. 0xa8, 0x61, 0xca, 0x59, 0x5e, 0x09, 0x66, 0x52, 0x6a, 0xdf, 0x1c, 0x09, 0x5c, 0xbd, 0x49, 0xf9,
  280. 0xc7, 0x4a, 0x98, 0xe1, 0x14, 0x99, 0xc1, 0xfd, 0x16, 0xdc, 0x2e, 0x6b, 0x9d, 0xe2, 0x23, 0x6a,
  281. 0xb7, 0x49, 0xdb, 0x6d, 0xd2, 0x77, 0x6b, 0x40, 0xd8, 0x6b, 0xcc, 0x7e, 0xff, 0x3d, 0x76, 0xa2,
  282. 0x03, 0xab, 0xd7, 0x76, 0x5e, 0xf7, 0x7e, 0x5c, 0x8d, 0x9d, 0x3f, 0x57, 0x63, 0xc7, 0x3f, 0x86,
  283. 0xd1, 0xb5, 0x8c, 0x88, 0x0f, 0xc3, 0xa2, 0x8a, 0xd9, 0x05, 0xaf, 0x99, 0x09, 0xd1, 0x73, 0x26,
  284. 0xee, 0x51, 0x3f, 0x1a, 0x14, 0x55, 0x7c, 0xc6, 0xeb, 0xcf, 0x4d, 0x69, 0x43, 0xe0, 0x1c, 0xf6,
  285. 0x4f, 0x51, 0x2d, 0x78, 0xb2, 0x66, 0x4f, 0x61, 0x64, 0xac, 0xb0, 0xeb, 0x39, 0x0e, 0x4d, 0x79,
  286. 0xd6, 0x86, 0xe9, 0xc3, 0xb0, 0xc3, 0x75, 0x91, 0x0e, 0x5a, 0xd4, 0x09, 0xaa, 0x90, 0x9e, 0xbf,
  287. 0x48, 0x33, 0xbd, 0xa8, 0x62, 0x3a, 0x97, 0x22, 0xe8, 0x56, 0xbc, 0x79, 0xdc, 0xf8, 0x25, 0xf1,
  288. 0x9e, 0xb9, 0xbc, 0xfa, 0x17, 0x00, 0x00, 0xff, 0xff, 0xc9, 0xc9, 0x35, 0x8e, 0x3b, 0x03, 0x00,
  289. 0x00,
  290. }
  291. func (this *EvidenceParams) Equal(that interface{}) bool {
  292. if that == nil {
  293. return this == nil
  294. }
  295. that1, ok := that.(*EvidenceParams)
  296. if !ok {
  297. that2, ok := that.(EvidenceParams)
  298. if ok {
  299. that1 = &that2
  300. } else {
  301. return false
  302. }
  303. }
  304. if that1 == nil {
  305. return this == nil
  306. } else if this == nil {
  307. return false
  308. }
  309. if this.MaxAgeNumBlocks != that1.MaxAgeNumBlocks {
  310. return false
  311. }
  312. if this.MaxAgeDuration != that1.MaxAgeDuration {
  313. return false
  314. }
  315. if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
  316. return false
  317. }
  318. return true
  319. }
  320. func (this *ValidatorParams) Equal(that interface{}) bool {
  321. if that == nil {
  322. return this == nil
  323. }
  324. that1, ok := that.(*ValidatorParams)
  325. if !ok {
  326. that2, ok := that.(ValidatorParams)
  327. if ok {
  328. that1 = &that2
  329. } else {
  330. return false
  331. }
  332. }
  333. if that1 == nil {
  334. return this == nil
  335. } else if this == nil {
  336. return false
  337. }
  338. if len(this.PubKeyTypes) != len(that1.PubKeyTypes) {
  339. return false
  340. }
  341. for i := range this.PubKeyTypes {
  342. if this.PubKeyTypes[i] != that1.PubKeyTypes[i] {
  343. return false
  344. }
  345. }
  346. if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
  347. return false
  348. }
  349. return true
  350. }
  351. func NewPopulatedEvidenceParams(r randyParams, easy bool) *EvidenceParams {
  352. this := &EvidenceParams{}
  353. this.MaxAgeNumBlocks = int64(r.Int63())
  354. if r.Intn(2) == 0 {
  355. this.MaxAgeNumBlocks *= -1
  356. }
  357. v1 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy)
  358. this.MaxAgeDuration = *v1
  359. if !easy && r.Intn(10) != 0 {
  360. this.XXX_unrecognized = randUnrecognizedParams(r, 3)
  361. }
  362. return this
  363. }
  364. func NewPopulatedValidatorParams(r randyParams, easy bool) *ValidatorParams {
  365. this := &ValidatorParams{}
  366. v2 := r.Intn(10)
  367. this.PubKeyTypes = make([]string, v2)
  368. for i := 0; i < v2; i++ {
  369. this.PubKeyTypes[i] = string(randStringParams(r))
  370. }
  371. if !easy && r.Intn(10) != 0 {
  372. this.XXX_unrecognized = randUnrecognizedParams(r, 2)
  373. }
  374. return this
  375. }
  376. type randyParams interface {
  377. Float32() float32
  378. Float64() float64
  379. Int63() int64
  380. Int31() int32
  381. Uint32() uint32
  382. Intn(n int) int
  383. }
  384. func randUTF8RuneParams(r randyParams) rune {
  385. ru := r.Intn(62)
  386. if ru < 10 {
  387. return rune(ru + 48)
  388. } else if ru < 36 {
  389. return rune(ru + 55)
  390. }
  391. return rune(ru + 61)
  392. }
  393. func randStringParams(r randyParams) string {
  394. v3 := r.Intn(100)
  395. tmps := make([]rune, v3)
  396. for i := 0; i < v3; i++ {
  397. tmps[i] = randUTF8RuneParams(r)
  398. }
  399. return string(tmps)
  400. }
  401. func randUnrecognizedParams(r randyParams, maxFieldNumber int) (dAtA []byte) {
  402. l := r.Intn(5)
  403. for i := 0; i < l; i++ {
  404. wire := r.Intn(4)
  405. if wire == 3 {
  406. wire = 5
  407. }
  408. fieldNumber := maxFieldNumber + r.Intn(100)
  409. dAtA = randFieldParams(dAtA, r, fieldNumber, wire)
  410. }
  411. return dAtA
  412. }
  413. func randFieldParams(dAtA []byte, r randyParams, fieldNumber int, wire int) []byte {
  414. key := uint32(fieldNumber)<<3 | uint32(wire)
  415. switch wire {
  416. case 0:
  417. dAtA = encodeVarintPopulateParams(dAtA, uint64(key))
  418. v4 := r.Int63()
  419. if r.Intn(2) == 0 {
  420. v4 *= -1
  421. }
  422. dAtA = encodeVarintPopulateParams(dAtA, uint64(v4))
  423. case 1:
  424. dAtA = encodeVarintPopulateParams(dAtA, uint64(key))
  425. dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
  426. case 2:
  427. dAtA = encodeVarintPopulateParams(dAtA, uint64(key))
  428. ll := r.Intn(100)
  429. dAtA = encodeVarintPopulateParams(dAtA, uint64(ll))
  430. for j := 0; j < ll; j++ {
  431. dAtA = append(dAtA, byte(r.Intn(256)))
  432. }
  433. default:
  434. dAtA = encodeVarintPopulateParams(dAtA, uint64(key))
  435. dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
  436. }
  437. return dAtA
  438. }
  439. func encodeVarintPopulateParams(dAtA []byte, v uint64) []byte {
  440. for v >= 1<<7 {
  441. dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
  442. v >>= 7
  443. }
  444. dAtA = append(dAtA, uint8(v))
  445. return dAtA
  446. }