From 99cb6fd33e4adad65938f32220300b7535884d6c Mon Sep 17 00:00:00 2001 From: "laocheng.cheng" Date: Fri, 7 May 2021 19:22:35 +0800 Subject: [PATCH 1/2] mod --- js/protos/node/node_pb.js | 14 ++--- js/protos/status/status_pb.js | 14 ++--- protos/node/node.pb.go | 104 ++++++++++++++++------------------ protos/node/node.proto | 2 +- protos/status/status.pb.go | 101 +++++++++++++++------------------ protos/status/status.proto | 2 +- 6 files changed, 113 insertions(+), 124 deletions(-) diff --git a/js/protos/node/node_pb.js b/js/protos/node/node_pb.js index a29f3be..60b646f 100644 --- a/js/protos/node/node_pb.js +++ b/js/protos/node/node_pb.js @@ -5927,7 +5927,7 @@ proto.node.BtfsScanTab.toObject = function(includeInstance, msg) { storageLeftWhenContract: jspb.Message.getFloatingPointFieldWithDefault(msg, 16, 0.0), superOnlineMinersCount: jspb.Message.getFieldWithDefault(msg, 17, 0), newOnlineMinersCount: jspb.Message.getFieldWithDefault(msg, 18, 0), - minersAllAmount: jspb.Message.getFieldWithDefault(msg, 19, 0) + minersAllAmount: jspb.Message.getFloatingPointFieldWithDefault(msg, 19, 0.0) }; if (includeInstance) { @@ -6043,7 +6043,7 @@ proto.node.BtfsScanTab.deserializeBinaryFromReader = function(msg, reader) { msg.setNewOnlineMinersCount(value); break; case 19: - var value = /** @type {number} */ (reader.readUint32()); + var value = /** @type {number} */ (reader.readDouble()); msg.setMinersAllAmount(value); break; default: @@ -6198,8 +6198,8 @@ proto.node.BtfsScanTab.serializeBinaryToWriter = function(message, writer) { ); } f = message.getMinersAllAmount(); - if (f !== 0) { - writer.writeUint32( + if (f !== 0.0) { + writer.writeDouble( 19, f ); @@ -6578,11 +6578,11 @@ proto.node.BtfsScanTab.prototype.setNewOnlineMinersCount = function(value) { /** - * optional uint32 miners_all_amount = 19; + * optional double miners_all_amount = 19; * @return {number} */ proto.node.BtfsScanTab.prototype.getMinersAllAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 19, 0.0)); }; @@ -6591,7 +6591,7 @@ proto.node.BtfsScanTab.prototype.getMinersAllAmount = function() { * @return {!proto.node.BtfsScanTab} returns this */ proto.node.BtfsScanTab.prototype.setMinersAllAmount = function(value) { - return jspb.Message.setProto3IntField(this, 19, value); + return jspb.Message.setProto3FloatField(this, 19, value); }; diff --git a/js/protos/status/status_pb.js b/js/protos/status/status_pb.js index 180a463..8c9a2cf 100644 --- a/js/protos/status/status_pb.js +++ b/js/protos/status/status_pb.js @@ -747,7 +747,7 @@ proto.status.BtfsScanAggrReq.toObject = function(includeInstance, msg) { storageLeftWhenContract: jspb.Message.getFloatingPointFieldWithDefault(msg, 16, 0.0), superOnlineMinersCount: jspb.Message.getFieldWithDefault(msg, 17, 0), newOnlineMinersCount: jspb.Message.getFieldWithDefault(msg, 18, 0), - minersAllAmount: jspb.Message.getFieldWithDefault(msg, 19, 0) + minersAllAmount: jspb.Message.getFloatingPointFieldWithDefault(msg, 19, 0.0) }; if (includeInstance) { @@ -863,7 +863,7 @@ proto.status.BtfsScanAggrReq.deserializeBinaryFromReader = function(msg, reader) msg.setNewOnlineMinersCount(value); break; case 19: - var value = /** @type {number} */ (reader.readUint32()); + var value = /** @type {number} */ (reader.readDouble()); msg.setMinersAllAmount(value); break; default: @@ -1018,8 +1018,8 @@ proto.status.BtfsScanAggrReq.serializeBinaryToWriter = function(message, writer) ); } f = message.getMinersAllAmount(); - if (f !== 0) { - writer.writeUint32( + if (f !== 0.0) { + writer.writeDouble( 19, f ); @@ -1398,11 +1398,11 @@ proto.status.BtfsScanAggrReq.prototype.setNewOnlineMinersCount = function(value) /** - * optional uint32 miners_all_amount = 19; + * optional double miners_all_amount = 19; * @return {number} */ proto.status.BtfsScanAggrReq.prototype.getMinersAllAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 19, 0.0)); }; @@ -1411,7 +1411,7 @@ proto.status.BtfsScanAggrReq.prototype.getMinersAllAmount = function() { * @return {!proto.status.BtfsScanAggrReq} returns this */ proto.status.BtfsScanAggrReq.prototype.setMinersAllAmount = function(value) { - return jspb.Message.setProto3IntField(this, 19, value); + return jspb.Message.setProto3FloatField(this, 19, value); }; diff --git a/protos/node/node.pb.go b/protos/node/node.pb.go index fec5864..78a9255 100644 --- a/protos/node/node.pb.go +++ b/protos/node/node.pb.go @@ -1697,7 +1697,7 @@ type BtfsScanTab struct { StorageLeftWhenContract float64 `protobuf:"fixed64,16,opt,name=storage_left_when_contract,json=storageLeftWhenContract,proto3" json:"storage_left_when_contract,omitempty" pg:"storage_left_when_contract"` SuperOnlineMinersCount uint32 `protobuf:"varint,17,opt,name=super_online_miners_count,json=superOnlineMinersCount,proto3" json:"super_online_miners_count,omitempty" pg:"super_online_miners_count"` NewOnlineMinersCount uint32 `protobuf:"varint,18,opt,name=new_online_miners_count,json=newOnlineMinersCount,proto3" json:"new_online_miners_count,omitempty" pg:"new_online_miners_count"` - MinersAllAmount uint32 `protobuf:"varint,19,opt,name=miners_all_amount,json=minersAllAmount,proto3" json:"miners_all_amount,omitempty" pg:"miners_all_amount"` + MinersAllAmount float64 `protobuf:"fixed64,19,opt,name=miners_all_amount,json=minersAllAmount,proto3" json:"miners_all_amount,omitempty" pg:"miners_all_amount"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` @@ -1862,7 +1862,7 @@ func (m *BtfsScanTab) GetNewOnlineMinersCount() uint32 { return 0 } -func (m *BtfsScanTab) GetMinersAllAmount() uint32 { +func (m *BtfsScanTab) GetMinersAllAmount() float64 { if m != nil { return m.MinersAllAmount } @@ -2334,39 +2334,39 @@ var fileDescriptor_35f8e1f5ec2240a2 = []byte{ 0xd9, 0xd9, 0x67, 0x9e, 0x13, 0xd7, 0x0c, 0x07, 0xa6, 0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x38, 0x33, 0x3e, 0x5a, 0x20, 0x00, 0x00, } @@ -3668,11 +3668,12 @@ func (m *BtfsScanTab) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.XXX_unrecognized) } if m.MinersAllAmount != 0 { - i = encodeVarintNode(dAtA, i, uint64(m.MinersAllAmount)) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MinersAllAmount)))) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x98 + dAtA[i] = 0x99 } if m.NewOnlineMinersCount != 0 { i = encodeVarintNode(dAtA, i, uint64(m.NewOnlineMinersCount)) @@ -4426,7 +4427,10 @@ func NewPopulatedBtfsScanTab(r randyNode, easy bool) *BtfsScanTab { } this.SuperOnlineMinersCount = uint32(r.Uint32()) this.NewOnlineMinersCount = uint32(r.Uint32()) - this.MinersAllAmount = uint32(r.Uint32()) + this.MinersAllAmount = float64(r.Float64()) + if r.Intn(2) == 0 { + this.MinersAllAmount *= -1 + } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedNode(r, 20) } @@ -5162,7 +5166,7 @@ func (m *BtfsScanTab) Size() (n int) { n += 2 + sovNode(uint64(m.NewOnlineMinersCount)) } if m.MinersAllAmount != 0 { - n += 2 + sovNode(uint64(m.MinersAllAmount)) + n += 10 } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -9341,24 +9345,16 @@ func (m *BtfsScanTab) Unmarshal(dAtA []byte) error { } } case 19: - if wireType != 0 { + if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field MinersAllAmount", wireType) } - m.MinersAllAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinersAllAmount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.MinersAllAmount = float64(math.Float64frombits(v)) default: iNdEx = preIndex skippy, err := skipNode(dAtA[iNdEx:]) diff --git a/protos/node/node.proto b/protos/node/node.proto index d6674b8..e14cd01 100644 --- a/protos/node/node.proto +++ b/protos/node/node.proto @@ -276,7 +276,7 @@ message BtfsScanTab { double storage_left_when_contract = 16; uint32 super_online_miners_count = 17; uint32 new_online_miners_count = 18; - uint32 miners_all_amount = 19; + double miners_all_amount = 19; } message ScoreHistoryTab { diff --git a/protos/status/status.pb.go b/protos/status/status.pb.go index 46d5fed..bc062c4 100644 --- a/protos/status/status.pb.go +++ b/protos/status/status.pb.go @@ -248,7 +248,7 @@ type BtfsScanAggrReq struct { StorageLeftWhenContract float64 `protobuf:"fixed64,16,opt,name=storage_left_when_contract,json=storageLeftWhenContract,proto3" json:"storage_left_when_contract,omitempty" pg:"storage_left_when_contract"` SuperOnlineMinersCount uint32 `protobuf:"varint,17,opt,name=super_online_miners_count,json=superOnlineMinersCount,proto3" json:"super_online_miners_count,omitempty" pg:"super_online_miners_count"` NewOnlineMinersCount uint32 `protobuf:"varint,18,opt,name=new_online_miners_count,json=newOnlineMinersCount,proto3" json:"new_online_miners_count,omitempty" pg:"new_online_miners_count"` - MinersAllAmount uint32 `protobuf:"varint,19,opt,name=miners_all_amount,json=minersAllAmount,proto3" json:"miners_all_amount,omitempty" pg:"miners_all_amount"` + MinersAllAmount float64 `protobuf:"fixed64,19,opt,name=miners_all_amount,json=minersAllAmount,proto3" json:"miners_all_amount,omitempty" pg:"miners_all_amount"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` @@ -413,7 +413,7 @@ func (m *BtfsScanAggrReq) GetNewOnlineMinersCount() uint32 { return 0 } -func (m *BtfsScanAggrReq) GetMinersAllAmount() uint32 { +func (m *BtfsScanAggrReq) GetMinersAllAmount() float64 { if m != nil { return m.MinersAllAmount } @@ -752,40 +752,40 @@ var fileDescriptor_e9255cc60c5ca429 = []byte{ 0xf6, 0xb0, 0x84, 0xc9, 0x67, 0x70, 0x43, 0x15, 0x39, 0x93, 0xe1, 0x60, 0x13, 0xd8, 0x8d, 0x2d, 0xe0, 0xc6, 0x96, 0x90, 0xf0, 0x7d, 0x5f, 0x23, 0xd8, 0xdd, 0x7d, 0x0a, 0xcb, 0x26, 0xeb, 0x17, 0x05, 0x12, 0x0c, 0x5c, 0xcc, 0xd8, 0xd9, 0x87, 0x61, 0xf7, 0x60, 0xa1, 0xe4, 0x9a, 0x94, 0xd0, - 0x2e, 0x06, 0x5c, 0xc3, 0x80, 0x39, 0x0b, 0x34, 0xd3, 0xb4, 0x89, 0xee, 0xfa, 0x23, 0x58, 0xba, - 0xb8, 0x71, 0xc8, 0x3c, 0x5c, 0x75, 0x73, 0xac, 0x1a, 0x98, 0x9f, 0xa6, 0xc6, 0x4e, 0x69, 0x5a, - 0xd8, 0xe9, 0x35, 0x11, 0x58, 0xe3, 0xf3, 0xb1, 0x07, 0x5e, 0x7d, 0x17, 0x16, 0x2f, 0xea, 0x90, - 0xcb, 0x68, 0xac, 0x7f, 0x0d, 0x73, 0xa8, 0xf1, 0x2d, 0x37, 0x99, 0xec, 0x99, 0x41, 0xb4, 0x05, - 0x15, 0x6c, 0x31, 0xe5, 0x7b, 0xd8, 0x9e, 0xd7, 0x1b, 0x38, 0xef, 0xfb, 0x69, 0x47, 0xb4, 0x1d, - 0x94, 0xa4, 0xf5, 0xdf, 0xc7, 0x00, 0x02, 0x76, 0x46, 0x65, 0xbc, 0x9f, 0x75, 0x04, 0xb9, 0x0b, - 0xe3, 0xba, 0x97, 0xdb, 0x01, 0x36, 0xbb, 0x43, 0x5c, 0x6b, 0x5b, 0xc6, 0x51, 0x2f, 0x67, 0x01, - 0xe2, 0x64, 0x19, 0x26, 0x8d, 0x6c, 0xc8, 0x63, 0x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xab, 0x37, 0x6f, 0x57, 0xbc, 0xbf, 0xde, 0xae, 0x78, 0xff, 0xbe, 0x5d, 0xf1, + 0x7e, 0x7b, 0xb7, 0xe2, 0xfd, 0xf9, 0x6e, 0xc5, 0x7b, 0xf3, 0x6e, 0xc5, 0x83, 0x59, 0x2e, 0x1a, + 0xe6, 0x31, 0x5b, 0x2a, 0xef, 0x4e, 0xdb, 0x6a, 0x3a, 0x34, 0xf1, 0x87, 0xde, 0xcb, 0xf2, 0x19, + 0xdc, 0xae, 0xa0, 0xe0, 0x27, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xb2, 0xf5, 0xff, 0x60, 0x33, 0x0b, 0x00, 0x00, } @@ -1226,11 +1226,12 @@ func (m *BtfsScanAggrReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.XXX_unrecognized) } if m.MinersAllAmount != 0 { - i = encodeVarintStatus(dAtA, i, uint64(m.MinersAllAmount)) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MinersAllAmount)))) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x98 + dAtA[i] = 0x99 } if m.NewOnlineMinersCount != 0 { i = encodeVarintStatus(dAtA, i, uint64(m.NewOnlineMinersCount)) @@ -1705,7 +1706,7 @@ func (m *BtfsScanAggrReq) Size() (n int) { n += 2 + sovStatus(uint64(m.NewOnlineMinersCount)) } if m.MinersAllAmount != 0 { - n += 2 + sovStatus(uint64(m.MinersAllAmount)) + n += 10 } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -2718,24 +2719,16 @@ func (m *BtfsScanAggrReq) Unmarshal(dAtA []byte) error { } } case 19: - if wireType != 0 { + if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field MinersAllAmount", wireType) } - m.MinersAllAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinersAllAmount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.MinersAllAmount = float64(math.Float64frombits(v)) default: iNdEx = preIndex skippy, err := skipStatus(dAtA[iNdEx:]) diff --git a/protos/status/status.proto b/protos/status/status.proto index 5f998a5..01616bc 100644 --- a/protos/status/status.proto +++ b/protos/status/status.proto @@ -70,7 +70,7 @@ message BtfsScanAggrReq { double storage_left_when_contract = 16; uint32 super_online_miners_count = 17; uint32 new_online_miners_count = 18; - uint32 miners_all_amount = 19; + double miners_all_amount = 19; } message ScoreHistoryReq { From 5c04fc0f72e9fe23812d2ca40180431ecde37033 Mon Sep 17 00:00:00 2001 From: "laocheng.cheng" Date: Fri, 7 May 2021 19:32:27 +0800 Subject: [PATCH 2/2] mod --- js/protos/node/node_pb.js | 14 +-- js/protos/status/status_pb.js | 14 +-- protos/node/node.pb.go | 39 ++++--- protos/node/node.proto | 2 +- protos/status/status.pb.go | 191 ++++++++++++++++++---------------- protos/status/status.proto | 2 +- 6 files changed, 138 insertions(+), 124 deletions(-) diff --git a/js/protos/node/node_pb.js b/js/protos/node/node_pb.js index 60b646f..3b36690 100644 --- a/js/protos/node/node_pb.js +++ b/js/protos/node/node_pb.js @@ -5927,7 +5927,7 @@ proto.node.BtfsScanTab.toObject = function(includeInstance, msg) { storageLeftWhenContract: jspb.Message.getFloatingPointFieldWithDefault(msg, 16, 0.0), superOnlineMinersCount: jspb.Message.getFieldWithDefault(msg, 17, 0), newOnlineMinersCount: jspb.Message.getFieldWithDefault(msg, 18, 0), - minersAllAmount: jspb.Message.getFloatingPointFieldWithDefault(msg, 19, 0.0) + minersAllAmount: jspb.Message.getFieldWithDefault(msg, 19, 0) }; if (includeInstance) { @@ -6043,7 +6043,7 @@ proto.node.BtfsScanTab.deserializeBinaryFromReader = function(msg, reader) { msg.setNewOnlineMinersCount(value); break; case 19: - var value = /** @type {number} */ (reader.readDouble()); + var value = /** @type {number} */ (reader.readInt64()); msg.setMinersAllAmount(value); break; default: @@ -6198,8 +6198,8 @@ proto.node.BtfsScanTab.serializeBinaryToWriter = function(message, writer) { ); } f = message.getMinersAllAmount(); - if (f !== 0.0) { - writer.writeDouble( + if (f !== 0) { + writer.writeInt64( 19, f ); @@ -6578,11 +6578,11 @@ proto.node.BtfsScanTab.prototype.setNewOnlineMinersCount = function(value) { /** - * optional double miners_all_amount = 19; + * optional int64 miners_all_amount = 19; * @return {number} */ proto.node.BtfsScanTab.prototype.getMinersAllAmount = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 19, 0.0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); }; @@ -6591,7 +6591,7 @@ proto.node.BtfsScanTab.prototype.getMinersAllAmount = function() { * @return {!proto.node.BtfsScanTab} returns this */ proto.node.BtfsScanTab.prototype.setMinersAllAmount = function(value) { - return jspb.Message.setProto3FloatField(this, 19, value); + return jspb.Message.setProto3IntField(this, 19, value); }; diff --git a/js/protos/status/status_pb.js b/js/protos/status/status_pb.js index 8c9a2cf..6e8cfbb 100644 --- a/js/protos/status/status_pb.js +++ b/js/protos/status/status_pb.js @@ -747,7 +747,7 @@ proto.status.BtfsScanAggrReq.toObject = function(includeInstance, msg) { storageLeftWhenContract: jspb.Message.getFloatingPointFieldWithDefault(msg, 16, 0.0), superOnlineMinersCount: jspb.Message.getFieldWithDefault(msg, 17, 0), newOnlineMinersCount: jspb.Message.getFieldWithDefault(msg, 18, 0), - minersAllAmount: jspb.Message.getFloatingPointFieldWithDefault(msg, 19, 0.0) + minersAllAmount: jspb.Message.getFieldWithDefault(msg, 19, 0) }; if (includeInstance) { @@ -863,7 +863,7 @@ proto.status.BtfsScanAggrReq.deserializeBinaryFromReader = function(msg, reader) msg.setNewOnlineMinersCount(value); break; case 19: - var value = /** @type {number} */ (reader.readDouble()); + var value = /** @type {number} */ (reader.readInt64()); msg.setMinersAllAmount(value); break; default: @@ -1018,8 +1018,8 @@ proto.status.BtfsScanAggrReq.serializeBinaryToWriter = function(message, writer) ); } f = message.getMinersAllAmount(); - if (f !== 0.0) { - writer.writeDouble( + if (f !== 0) { + writer.writeInt64( 19, f ); @@ -1398,11 +1398,11 @@ proto.status.BtfsScanAggrReq.prototype.setNewOnlineMinersCount = function(value) /** - * optional double miners_all_amount = 19; + * optional int64 miners_all_amount = 19; * @return {number} */ proto.status.BtfsScanAggrReq.prototype.getMinersAllAmount = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 19, 0.0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); }; @@ -1411,7 +1411,7 @@ proto.status.BtfsScanAggrReq.prototype.getMinersAllAmount = function() { * @return {!proto.status.BtfsScanAggrReq} returns this */ proto.status.BtfsScanAggrReq.prototype.setMinersAllAmount = function(value) { - return jspb.Message.setProto3FloatField(this, 19, value); + return jspb.Message.setProto3IntField(this, 19, value); }; diff --git a/protos/node/node.pb.go b/protos/node/node.pb.go index 78a9255..caa09bf 100644 --- a/protos/node/node.pb.go +++ b/protos/node/node.pb.go @@ -1697,7 +1697,7 @@ type BtfsScanTab struct { StorageLeftWhenContract float64 `protobuf:"fixed64,16,opt,name=storage_left_when_contract,json=storageLeftWhenContract,proto3" json:"storage_left_when_contract,omitempty" pg:"storage_left_when_contract"` SuperOnlineMinersCount uint32 `protobuf:"varint,17,opt,name=super_online_miners_count,json=superOnlineMinersCount,proto3" json:"super_online_miners_count,omitempty" pg:"super_online_miners_count"` NewOnlineMinersCount uint32 `protobuf:"varint,18,opt,name=new_online_miners_count,json=newOnlineMinersCount,proto3" json:"new_online_miners_count,omitempty" pg:"new_online_miners_count"` - MinersAllAmount float64 `protobuf:"fixed64,19,opt,name=miners_all_amount,json=minersAllAmount,proto3" json:"miners_all_amount,omitempty" pg:"miners_all_amount"` + MinersAllAmount int64 `protobuf:"varint,19,opt,name=miners_all_amount,json=minersAllAmount,proto3" json:"miners_all_amount,omitempty" pg:"miners_all_amount"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` @@ -1862,7 +1862,7 @@ func (m *BtfsScanTab) GetNewOnlineMinersCount() uint32 { return 0 } -func (m *BtfsScanTab) GetMinersAllAmount() float64 { +func (m *BtfsScanTab) GetMinersAllAmount() int64 { if m != nil { return m.MinersAllAmount } @@ -2335,7 +2335,7 @@ var fileDescriptor_35f8e1f5ec2240a2 = []byte{ 0xa7, 0x70, 0x5f, 0x26, 0x91, 0x88, 0xed, 0xd9, 0xc4, 0xd7, 0x86, 0xb5, 0xc8, 0xb0, 0x55, 0x62, 0x38, 0xca, 0x25, 0xbf, 0xb6, 0xee, 0x63, 0x58, 0x43, 0xaf, 0xdf, 0x26, 0xc8, 0x48, 0x70, 0x25, 0x10, 0x97, 0x37, 0xc5, 0x1e, 0x43, 0xcb, 0xf0, 0xa2, 0x4b, 0x38, 0xdd, 0x9d, 0xe9, 0x65, 0xb2, - 0x60, 0x35, 0x34, 0xb0, 0xe3, 0xfb, 0x3b, 0x44, 0x5e, 0xdf, 0x83, 0xd5, 0xdb, 0x4b, 0x86, 0x35, + 0x68, 0x35, 0x34, 0xb0, 0xe3, 0xfb, 0x3b, 0x44, 0x5e, 0xdf, 0x83, 0xd5, 0xdb, 0x4b, 0x86, 0x35, 0xa1, 0x78, 0x2e, 0xae, 0xcc, 0xb9, 0x86, 0xff, 0x62, 0x8e, 0x5d, 0x70, 0x3f, 0x11, 0xe6, 0x17, 0x17, 0xbd, 0x78, 0x3e, 0xf7, 0x93, 0xc2, 0xfa, 0x2e, 0xac, 0xdc, 0x56, 0x21, 0x77, 0xd1, 0xb1, 0xf5, 0x17, 0x45, 0x68, 0x90, 0x92, 0x7d, 0x0f, 0x5d, 0x49, 0x3f, 0xbd, 0x9c, 0xdc, 0xd2, 0xb1, @@ -2366,7 +2366,7 @@ var fileDescriptor_35f8e1f5ec2240a2 = []byte{ 0x8d, 0xc2, 0x2f, 0xbf, 0xd9, 0x28, 0xfc, 0xfa, 0x9b, 0x8d, 0xc2, 0xdf, 0x7d, 0xbb, 0x51, 0xf8, 0xf7, 0x6f, 0x37, 0x0a, 0x5f, 0x7f, 0xbb, 0x51, 0x80, 0x9a, 0x17, 0x76, 0x70, 0x5e, 0xa2, 0x39, 0x61, 0xb7, 0x82, 0xde, 0x39, 0xc6, 0xa8, 0x1e, 0x17, 0xfe, 0x84, 0x7e, 0x5b, 0x3f, 0x5d, 0xa0, - 0x20, 0x7f, 0xf8, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x53, 0x38, 0x33, 0x3e, 0x5a, 0x20, 0x00, + 0x20, 0x7f, 0xf8, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9d, 0x4f, 0x2f, 0x65, 0x5a, 0x20, 0x00, 0x00, } @@ -3668,12 +3668,11 @@ func (m *BtfsScanTab) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.XXX_unrecognized) } if m.MinersAllAmount != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MinersAllAmount)))) + i = encodeVarintNode(dAtA, i, uint64(m.MinersAllAmount)) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x99 + dAtA[i] = 0x98 } if m.NewOnlineMinersCount != 0 { i = encodeVarintNode(dAtA, i, uint64(m.NewOnlineMinersCount)) @@ -4427,7 +4426,7 @@ func NewPopulatedBtfsScanTab(r randyNode, easy bool) *BtfsScanTab { } this.SuperOnlineMinersCount = uint32(r.Uint32()) this.NewOnlineMinersCount = uint32(r.Uint32()) - this.MinersAllAmount = float64(r.Float64()) + this.MinersAllAmount = int64(r.Int63()) if r.Intn(2) == 0 { this.MinersAllAmount *= -1 } @@ -5166,7 +5165,7 @@ func (m *BtfsScanTab) Size() (n int) { n += 2 + sovNode(uint64(m.NewOnlineMinersCount)) } if m.MinersAllAmount != 0 { - n += 10 + n += 2 + sovNode(uint64(m.MinersAllAmount)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -9345,16 +9344,24 @@ func (m *BtfsScanTab) Unmarshal(dAtA []byte) error { } } case 19: - if wireType != 1 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MinersAllAmount", wireType) } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + m.MinersAllAmount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinersAllAmount |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.MinersAllAmount = float64(math.Float64frombits(v)) default: iNdEx = preIndex skippy, err := skipNode(dAtA[iNdEx:]) diff --git a/protos/node/node.proto b/protos/node/node.proto index e14cd01..d177427 100644 --- a/protos/node/node.proto +++ b/protos/node/node.proto @@ -276,7 +276,7 @@ message BtfsScanTab { double storage_left_when_contract = 16; uint32 super_online_miners_count = 17; uint32 new_online_miners_count = 18; - double miners_all_amount = 19; + int64 miners_all_amount = 19; } message ScoreHistoryTab { diff --git a/protos/status/status.pb.go b/protos/status/status.pb.go index bc062c4..cb8aa7b 100644 --- a/protos/status/status.pb.go +++ b/protos/status/status.pb.go @@ -248,7 +248,7 @@ type BtfsScanAggrReq struct { StorageLeftWhenContract float64 `protobuf:"fixed64,16,opt,name=storage_left_when_contract,json=storageLeftWhenContract,proto3" json:"storage_left_when_contract,omitempty" pg:"storage_left_when_contract"` SuperOnlineMinersCount uint32 `protobuf:"varint,17,opt,name=super_online_miners_count,json=superOnlineMinersCount,proto3" json:"super_online_miners_count,omitempty" pg:"super_online_miners_count"` NewOnlineMinersCount uint32 `protobuf:"varint,18,opt,name=new_online_miners_count,json=newOnlineMinersCount,proto3" json:"new_online_miners_count,omitempty" pg:"new_online_miners_count"` - MinersAllAmount float64 `protobuf:"fixed64,19,opt,name=miners_all_amount,json=minersAllAmount,proto3" json:"miners_all_amount,omitempty" pg:"miners_all_amount"` + MinersAllAmount int64 `protobuf:"varint,19,opt,name=miners_all_amount,json=minersAllAmount,proto3" json:"miners_all_amount,omitempty" pg:"miners_all_amount"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` @@ -413,7 +413,7 @@ func (m *BtfsScanAggrReq) GetNewOnlineMinersCount() uint32 { return 0 } -func (m *BtfsScanAggrReq) GetMinersAllAmount() float64 { +func (m *BtfsScanAggrReq) GetMinersAllAmount() int64 { if m != nil { return m.MinersAllAmount } @@ -707,86 +707,86 @@ func init() { proto.RegisterFile("protos/status/status.proto", fileDescriptor_e9 func init() { golang_proto.RegisterFile("protos/status/status.proto", fileDescriptor_e9255cc60c5ca429) } var fileDescriptor_e9255cc60c5ca429 = []byte{ - // 1251 bytes of a gzipped FileDescriptorProto + // 1254 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x5f, 0x4f, 0x1b, 0x47, - 0x10, 0xcf, 0x11, 0x30, 0x78, 0xc0, 0xfc, 0xd9, 0x10, 0xb8, 0x38, 0x09, 0x20, 0x22, 0x45, 0x28, - 0x02, 0x13, 0x51, 0x55, 0x4a, 0x5b, 0xa9, 0xad, 0x49, 0x48, 0x4b, 0x93, 0x50, 0x74, 0x26, 0x8d, - 0x14, 0xa9, 0x3a, 0xad, 0xef, 0xd6, 0xc7, 0x8a, 0xf3, 0xed, 0x65, 0x77, 0x0f, 0xea, 0x7c, 0x81, - 0xbe, 0xf6, 0xa5, 0x52, 0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f, 0xe2, 0xff, 0x5c, 0x85, 0xf9, 0x3d, 0xdd, 0x51, 0xad, 0x88, 0x66, 0x8e, 0x7b, + 0x0b, 0x40, 0xd3, 0x76, 0xca, 0xc2, 0x8c, 0x76, 0x1d, 0xbf, 0x8a, 0x9e, 0x43, 0xda, 0x65, 0xa4, + 0x01, 0x57, 0x95, 0x16, 0x92, 0x26, 0x2c, 0x3c, 0x13, 0x69, 0xd1, 0x65, 0x61, 0xca, 0x3a, 0x1a, + 0xb7, 0xe4, 0x05, 0x8b, 0x25, 0xf4, 0x03, 0x22, 0x4f, 0x58, 0x47, 0x93, 0x7b, 0xb0, 0x24, 0xb2, + 0x94, 0x67, 0x2c, 0xec, 0xf2, 0x8c, 0x49, 0x15, 0x66, 0x45, 0xb7, 0xcd, 0x24, 0xee, 0xb3, 0x16, + 0x10, 0x8b, 0x3d, 0x45, 0xe8, 0x10, 0x11, 0xf2, 0x23, 0x90, 0x48, 0x14, 0x99, 0x96, 0xbd, 0x30, + 0xe6, 0x4a, 0x4b, 0xde, 0x2e, 0x34, 0xf3, 0x27, 0xd6, 0xc7, 0x37, 0x67, 0x76, 0x1b, 0x8d, 0xb2, + 0x6e, 0x86, 0x56, 0xdd, 0x78, 0x60, 0x23, 0x1e, 0x5e, 0x04, 0xec, 0x1b, 0x33, 0x58, 0x8c, 0x86, + 0xfd, 0xe4, 0x39, 0x2c, 0xa8, 0x48, 0x48, 0xd6, 0x2f, 0x3e, 0x89, 0xe2, 0x5b, 0xa3, 0xc4, 0x5b, + 0x86, 0x3f, 0x2c, 0x3d, 0xaf, 0x06, 0xbd, 0xe4, 0x1b, 0x98, 0x35, 0x55, 0x12, 0x46, 0x92, 0x51, + 0xcd, 0x62, 0xbf, 0xb2, 0xee, 0x6d, 0xce, 0xec, 0xd6, 0x1b, 0xb6, 0x94, 0x1a, 0xae, 0x94, 0x1a, + 0xc7, 0xae, 0x94, 0xf6, 0xa6, 0x5f, 0xff, 0xbd, 0x76, 0xe5, 0x97, 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, 0x7e, 0x7b, 0xbb, 0xea, 0xfd, 0xf9, 0x76, 0xd5, 0x7b, 0xfd, 0x76, 0xd5, 0x83, + 0x39, 0x2e, 0x1a, 0xe6, 0x31, 0x5b, 0x2a, 0xef, 0xcd, 0xd8, 0x6a, 0x3a, 0x32, 0xf1, 0x47, 0xde, + 0x8b, 0xf2, 0x19, 0xdc, 0xae, 0xa0, 0xe0, 0x27, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xc6, 0x48, + 0xd5, 0x74, 0x33, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1226,12 +1226,11 @@ func (m *BtfsScanAggrReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.XXX_unrecognized) } if m.MinersAllAmount != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MinersAllAmount)))) + i = encodeVarintStatus(dAtA, i, uint64(m.MinersAllAmount)) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x99 + dAtA[i] = 0x98 } if m.NewOnlineMinersCount != 0 { i = encodeVarintStatus(dAtA, i, uint64(m.NewOnlineMinersCount)) @@ -1706,7 +1705,7 @@ func (m *BtfsScanAggrReq) Size() (n int) { n += 2 + sovStatus(uint64(m.NewOnlineMinersCount)) } if m.MinersAllAmount != 0 { - n += 10 + n += 2 + sovStatus(uint64(m.MinersAllAmount)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -2719,16 +2718,24 @@ func (m *BtfsScanAggrReq) Unmarshal(dAtA []byte) error { } } case 19: - if wireType != 1 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MinersAllAmount", wireType) } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + m.MinersAllAmount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStatus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinersAllAmount |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.MinersAllAmount = float64(math.Float64frombits(v)) default: iNdEx = preIndex skippy, err := skipStatus(dAtA[iNdEx:]) diff --git a/protos/status/status.proto b/protos/status/status.proto index 01616bc..ccfd7e3 100644 --- a/protos/status/status.proto +++ b/protos/status/status.proto @@ -70,7 +70,7 @@ message BtfsScanAggrReq { double storage_left_when_contract = 16; uint32 super_online_miners_count = 17; uint32 new_online_miners_count = 18; - double miners_all_amount = 19; + int64 miners_all_amount = 19; } message ScoreHistoryReq {