Use miner instead of miner_id on side block / payouts
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2023-07-30 14:15:30 +02:00
parent 42d570a167
commit d03ba313d5
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk
3 changed files with 29 additions and 43 deletions

View file

@ -6,7 +6,7 @@ import (
)
type Payout struct {
Miner uint64 `json:"miner_id"`
Miner uint64 `json:"miner"`
TemplateId types.Hash `json:"template_id"`
SideHeight uint64 `json:"side_height"`
UncleOf types.Hash `json:"uncle_of,omitempty"`

View file

@ -39,7 +39,7 @@ type SideBlock struct {
ParentTemplateId types.Hash `json:"parent_template_id"`
// Miner internal id of the miner who contributed the block
Miner uint64 `json:"miner_id"`
Miner uint64 `json:"miner"`
// Uncle inclusion information
@ -81,7 +81,7 @@ type SideBlock struct {
type SideBlockUncleEntry struct {
TemplateId types.Hash `json:"template_id"`
Miner uint64 `json:"miner_id"`
Miner uint64 `json:"miner"`
SideHeight uint64 `json:"side_height"`
Difficulty uint64 `json:"difficulty"`
}

View file

@ -97,8 +97,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/side_blocks_in_wi
"template_id": "8782465759db40c11f64e78a26df4ec6221fb91202cc19a3beaef61acb8e1a50",
"side_height": 4882215,
"parent_template_id": "2ee8e55e2d0696d715049f5958c300c10b01d0a30b607c82afb8885a76f00d71",
"miner_id": 3,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"miner": 3,
"effective_height": 4882215,
"nonce": 3691022871,
"extra_nonce": 1665655721,
@ -122,8 +121,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/side_blocks_in_wi
"template_id": "2ee8e55e2d0696d715049f5958c300c10b01d0a30b607c82afb8885a76f00d71",
"side_height": 4882214,
"parent_template_id": "e0b745e8e3004832d95ef7eb6aa5f43dd0f86a491b6edb8ccd8e8dfbf92f6768",
"miner_id": 2,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"miner": 2,
"effective_height": 4882214,
"nonce": 3791814950,
"extra_nonce": 610282123,
@ -142,7 +140,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/side_blocks_in_wi
"uncles": [
{
"template_id": "4005ede80787679e83d269f09f6435ac4952d9c2cf2fadf999620ed81a948d40",
"miner_id": 77,
"miner": 77,
"side_height": 4882213,
"difficulty": 2109635914
}
@ -155,7 +153,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/side_blocks_in_wi
"template_id": "4005ede80787679e83d269f09f6435ac4952d9c2cf2fadf999620ed81a948d40",
"side_height": 4882213,
"parent_template_id": "985d621e565da6da1f772dffef4b1154678cc724b6b18eff6edde5e68136a45d",
"miner_id": 77,
"miner": 77,
"uncle_of": "2ee8e55e2d0696d715049f5958c300c10b01d0a30b607c82afb8885a76f00d71",
"effective_height": 4882214,
"nonce": 3326443597,
@ -180,8 +178,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/side_blocks_in_wi
"template_id": "e0b745e8e3004832d95ef7eb6aa5f43dd0f86a491b6edb8ccd8e8dfbf92f6768",
"side_height": 4882213,
"parent_template_id": "985d621e565da6da1f772dffef4b1154678cc724b6b18eff6edde5e68136a45d",
"miner_id": 18,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"miner": 18,
"effective_height": 4882213,
"nonce": 3506931857,
"extra_nonce": 1625389436,
@ -219,8 +216,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/side_blocks_in_wi
"template_id": "ce8de3ca5a9a066c0b4f5d5068783b17ace476f56236c65f5c949b9039c0ca3e",
"side_height": 4882250,
"parent_template_id": "a0cb288e467f5a4069603f4047c8607f1721a4b62fc8e2f794a5a942828fdf32",
"miner_id": 3,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"miner": 3,
"effective_height": 4882250,
"nonce": 2046825740,
"extra_nonce": 1477203696,
@ -244,8 +240,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/side_blocks_in_wi
"template_id": "74caf5d6ba885d05adbb4e4d611edabb55f0e05dcbb20cd3105d2adbcf4cdd1b",
"side_height": 4882248,
"parent_template_id": "3378e835d72a821b5157d8bebaf4f2193ebaf9cb86c93a106fc4fbbb1921c158",
"miner_id": 3,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"miner": 3,
"effective_height": 4882248,
"nonce": 3456175326,
"extra_nonce": 2803310737,
@ -269,8 +264,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/side_blocks_in_wi
"template_id": "52ad4bb20d62b0e9d7762bab8d27de05563be6147cf3367d9bc79688f794217c",
"side_height": 4882246,
"parent_template_id": "40865b24eb4fbd1428ff1444d21b4337c8922b60b63a3ab6bdfef2586775390b",
"miner_id": 3,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"miner": 3,
"effective_height": 4882246,
"nonce": 754974898,
"extra_nonce": 2953378118,
@ -289,7 +283,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/side_blocks_in_wi
"uncles": [
{
"template_id": "ab07fe1e4a6a00ae799bedc637c1b642b4938d302ec16db5b513923937614abe",
"miner_id": 7,
"miner": 7,
"side_height": 4882244,
"difficulty": 2105207888
}
@ -302,8 +296,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/side_blocks_in_wi
"template_id": "4764acc29d604f1491d600504d2802fea156a47ad691420b63d2c52924570925",
"side_height": 4882241,
"parent_template_id": "12f8b044e315669904f81caa055eac84f9a7d30d93bdd446cf304d38f18097cf",
"miner_id": 3,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"miner": 3,
"effective_height": 4882241,
"nonce": 4026633700,
"extra_nonce": 2755066571,
@ -338,7 +331,6 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/payouts/47ab14Eok
{
"template_id": "b87002e6b77723aaf9bd23f5425bd4d1e5d59a5f964b611dbcac44cf87d5fd3e",
"side_height": 4882060,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"main_id": "25aa3d6170869ce66aebb0f8932acf04885a64db70caa75e973b3111d3f643f8",
"main_height": 2863472,
"timestamp": 1681401091,
@ -351,7 +343,6 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/payouts/47ab14Eok
{
"template_id": "05442258dc454342d3573106f0a8a57e1f47fb939f4a6d233abe194facc1d620",
"side_height": 4881901,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"main_id": "41a719bb13c3b652f2a204aaee03c645e6d773964efe701ce317507554170a7b",
"main_height": 2863457,
"timestamp": 1681399294,
@ -364,7 +355,6 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/payouts/47ab14Eok
{
"template_id": "bbca455a6032045d730e9311c8b83ec090ff93366bbd8dac7a6f6492425220cb",
"side_height": 4881818,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"main_id": "d528a54cff102eab4e6e311978921f15348ea88afa8ddc066eb6d5255ba09c81",
"main_height": 2863442,
"timestamp": 1681398196,
@ -400,7 +390,6 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/found_blocks?limi
},
"side_height": 4882060,
"miner": 4,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"effective_height": 4882060,
"window_depth": 292,
"window_outputs": 31,
@ -424,7 +413,6 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/found_blocks?limi
},
"side_height": 4881901,
"miner": 3,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"effective_height": 4881901,
"window_depth": 299,
"window_outputs": 25,
@ -453,8 +441,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/shares?limit=2
"template_id": "4c8706e878fa4b50b4e43f86614291b04936a12d23207b4356d6527fec4c77e1",
"side_height": 4882328,
"parent_template_id": "4e96b17ff920d5090c46634f48237da103525c10b3f2eb63765892525d0555e8",
"miner_id": 3,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"miner": 3,
"effective_height": 4882328,
"nonce": 1157627952,
"extra_nonce": 2079385110,
@ -478,8 +465,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/shares?limit=2
"template_id": "4e96b17ff920d5090c46634f48237da103525c10b3f2eb63765892525d0555e8",
"side_height": 4882327,
"parent_template_id": "5885c5610c475d8bb3a4162c91511a08fc3493fa3a028bcc51648fe1ae8df6a1",
"miner_id": 2,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"miner": 2,
"effective_height": 4882327,
"nonce": 1778484165,
"extra_nonce": 2015373570,
@ -517,7 +503,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_id/179cf
"template_id": "179cf9d77c7d198dc4d9a5deb03561b6121336fe9ea72fbda00fbf6eea34a34d",
"side_height": 4877733,
"parent_template_id": "ffd6a96ce3131f043f273582a69d1eaa42b7557f47f7b241140cb22af9fbf556",
"miner_id": 3,
"miner": 3,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"effective_height": 4877733,
"nonce": 1694662668,
@ -557,7 +543,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_height/4
"template_id": "09d1974eea6de73d3cb95bc495b0b24a7b6f6405eaada53c4ec1ad3f513a4cc8",
"side_height": 4868351,
"parent_template_id": "b74acca03b7593386dd54b8132bf79522c9861b41f7797d0ce4f2af5f35cc170",
"miner_id": 1,
"miner": 1,
"uncle_of": "0000000000000000000000000000000000000000000000000000000000000000",
"effective_height": 4868351,
"nonce": 3271624915,
@ -596,7 +582,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_height/4
"template_id":"7c5db68e5af86e66df94d03688a8f61d7e7cd4544dbadc3f4d2f7972c0c72b17",
"side_height":4973833,
"parent_template_id":"10e2b50eb5c688bea4852f25b0d3550fe0e4e8192ea0602a373fb48454496e20",
"miner_id":19,
"miner":19,
"uncle_of":"372ee3a80d8ab9131878a56e5e2802aa3f797a55d38f76871f1eeeafd60cd828",
"effective_height":4973834,
"nonce":4127591028,
@ -625,7 +611,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_height/4
"template_id":"372ee3a80d8ab9131878a56e5e2802aa3f797a55d38f76871f1eeeafd60cd828",
"side_height":4973834,
"parent_template_id":"8d691190875157d160c8bc8787ab140b1855c1afcc7b8f3076bc3366711bb085",
"miner_id":2,
"miner":2,
"uncle_of":"0000000000000000000000000000000000000000000000000000000000000000",
"effective_height":4973834,
"nonce":402718979,
@ -645,7 +631,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_height/4
"uncles":[
{
"template_id":"7c5db68e5af86e66df94d03688a8f61d7e7cd4544dbadc3f4d2f7972c0c72b17",
"miner_id":19,
"miner":19,
"side_height":4973833,
"difficulty":1902041368
}
@ -662,7 +648,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_height/4
"template_id":"320a1a1d8849d48243670938efa640a271b289fae392ea35eb1a7daf88d3e2c8",
"side_height":4973835,
"parent_template_id":"372ee3a80d8ab9131878a56e5e2802aa3f797a55d38f76871f1eeeafd60cd828",
"miner_id":3,
"miner":3,
"uncle_of":"0000000000000000000000000000000000000000000000000000000000000000",
"effective_height":4973835,
"nonce":3825436994,
@ -691,7 +677,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_height/4
"template_id":"3f089efbc7fd31eb98705665acbbe1e7d3b290866cb94f39a0d2e072f2a11f14",
"side_height":4973836,
"parent_template_id":"320a1a1d8849d48243670938efa640a271b289fae392ea35eb1a7daf88d3e2c8",
"miner_id":9,
"miner":9,
"uncle_of":"0000000000000000000000000000000000000000000000000000000000000000",
"effective_height":4973836,
"nonce":132358,
@ -720,7 +706,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_height/4
"template_id":"ba8514bd7403c16a61b7e20f34981d9cb72de09a7b0593d55ef14d55bff1908e",
"side_height":4973837,
"parent_template_id":"3f089efbc7fd31eb98705665acbbe1e7d3b290866cb94f39a0d2e072f2a11f14",
"miner_id":2,
"miner":2,
"uncle_of":"0000000000000000000000000000000000000000000000000000000000000000",
"effective_height":4973837,
"nonce":1879082776,
@ -749,7 +735,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_height/4
"template_id":"19278cd3a3022a25edf4b91a5544a88b8c8f6f78f84e862b01781de493b562c8",
"side_height":4973838,
"parent_template_id":"ba8514bd7403c16a61b7e20f34981d9cb72de09a7b0593d55ef14d55bff1908e",
"miner_id":3,
"miner":3,
"uncle_of":"0000000000000000000000000000000000000000000000000000000000000000",
"effective_height":4973838,
"nonce":2868937852,
@ -778,7 +764,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_height/4
"template_id":"000c39fc469e4062fe4da6fc8444c3c990ad817397c94abe13c46720a4c9ab75",
"side_height":4973839,
"parent_template_id":"19278cd3a3022a25edf4b91a5544a88b8c8f6f78f84e862b01781de493b562c8",
"miner_id":2,
"miner":2,
"uncle_of":"0000000000000000000000000000000000000000000000000000000000000000",
"effective_height":4973839,
"nonce":822086856,
@ -807,7 +793,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_height/4
"template_id":"af88e464df1f31761996031f5c851f1a59d6ecb4b6e917407e1164ce6a569a07",
"side_height":4973840,
"parent_template_id":"000c39fc469e4062fe4da6fc8444c3c990ad817397c94abe13c46720a4c9ab75",
"miner_id":19,
"miner":19,
"uncle_of":"0000000000000000000000000000000000000000000000000000000000000000",
"effective_height":4973840,
"nonce":1543602719,
@ -1113,7 +1099,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_height/4
"template_id":"0ef3e5ddcb0c4f6398eb833361b3749f92fc232a049c52052c5da956c9bbc868",
"side_height":4973841,
"parent_template_id":"af88e464df1f31761996031f5c851f1a59d6ecb4b6e917407e1164ce6a569a07",
"miner_id":4,
"miner":4,
"uncle_of":"0000000000000000000000000000000000000000000000000000000000000000",
"effective_height":4973841,
"nonce":2466322468,
@ -1142,7 +1128,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_height/4
"template_id":"5f72a35b571746ac3835b204020e548e65a7350d84d5d7a7aa3a749dc058f7ad",
"side_height":4973842,
"parent_template_id":"0ef3e5ddcb0c4f6398eb833361b3749f92fc232a049c52052c5da956c9bbc868",
"miner_id":19,
"miner":19,
"uncle_of":"0000000000000000000000000000000000000000000000000000000000000000",
"effective_height":4973842,
"nonce":1090620480,
@ -1171,7 +1157,7 @@ curl --silent https://{%s p.Context().NetServiceAddress %}/api/block_by_height/4
"template_id":"b95dcd9d440fcd49a050c76f006189c01e1857d11bfc0b41f3fa560c15a4750f",
"side_height":4973843,
"parent_template_id":"5f72a35b571746ac3835b204020e548e65a7350d84d5d7a7aa3a749dc058f7ad",
"miner_id":3,
"miner":3,
"uncle_of":"0000000000000000000000000000000000000000000000000000000000000000",
"effective_height":4973843,
"nonce":4026630147,