Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSUB-202 OCW Lock #388

Merged
merged 6 commits into from
Jul 13, 2022
Merged

CSUB-202 OCW Lock #388

merged 6 commits into from
Jul 13, 2022

Conversation

CAGS295
Copy link
Contributor

@CAGS295 CAGS295 commented Jul 1, 2022

Description of proposed changes:
Lock access to unverified tasks

Practical tips for PR review & merge:

  • All GitHub Actions report PASS
  • Newly added code/functions have unit tests
    • Coverage tools report all newly added lines as covered
    • The positive scenario is exercised
    • Negative scenarios are exercised, e.g. assert on all possible errors
    • Assert on events triggered if applicable
    • Assert on changes made to storage if applicable
  • Modified behavior/functions - try to make sure above test items are covered
  • Integration tests are added if applicable/needed

@github-actions

This comment was marked as outdated.

Copy link
Contributor

@nathanwhit nathanwhit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of nitpicks, otherwise looks good!

pallets/creditcoin/src/ocw/tasks.rs Show resolved Hide resolved
pallets/creditcoin/src/ocw/tasks.rs Outdated Show resolved Hide resolved
@github-actions

This comment was marked as outdated.

@github-actions
Copy link

For full LLVM coverage report click here!

Uncovered Lines:
./node/rpc/src/friendly.rs: 5, 79, 80, 81, 82, 83, 84, 86, 87, 89, 90, 92, 94, 95, 96, 98, 100, 101, 102, 103, 105, 106, 108, 109, 111, 112, 114, 115, 117, 118, 120, 121, 123, 124, 126, 127, 129, 130, 132, 134, 135, 136, 137, 138, 139, 140, 141, 142, 145
./node/rpc/src/lib.rs: 24, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 75, 76, 77, 78, 79, 81, 84, 85, 86, 87, 88, 89, 90, 91, 95, 96, 97, 98, 100, 101, 102, 103, 104, 105, 106, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 131, 132, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 173, 175, 176, 177, 178, 179, 180, 181, 182, 184, 185, 186, 188, 189, 190, 191, 192, 193, 196
./node/src/chain_spec.rs: 16, 17, 18, 19, 20, 25, 26, 27, 28, 29, 30, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122, 124, 125, 126, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156
./node/src/cli.rs: 13, 14, 16, 39, 47, 48, 49, 51, 52, 53, 55, 57, 59
./node/src/command.rs: 11, 12, 13, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27, 28, 29, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 51, 53, 54, 55, 59, 60, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 110, 111, 112, 114, 116, 117, 118, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 133, 134, 137
./node/src/main.rs: 11, 12, 13
./node/src/rpc.rs: 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75
./node/src/service.rs: 21, 22, 23, 25, 26, 27, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 141, 142, 143, 144, 145, 146, 151, 153, 154, 155, 157, 158, 160, 163, 164, 165, 166, 167, 168, 169, 170, 176, 178, 181, 182, 183, 184, 185, 186, 188, 189, 190, 191, 192, 193, 194, 195, 196, 198, 199, 200, 201, 202, 203, 204, 205, 208, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 243, 244, 245, 246, 247, 248, 249, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 337, 338, 339, 340, 341, 343, 344, 345, 346, 347, 349, 350, 351, 352, 354, 355, 356, 357, 358, 359, 360, 362, 364, 365, 367, 371, 372, 374, 375, 376
./pallets/creditcoin/src/helpers.rs: 107
./pallets/creditcoin/src/helpers/external_address.rs: 20, 21
./pallets/creditcoin/src/lib.rs: 40, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 162, 163, 164, 165, 167, 168, 169, 171, 172, 174, 175, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 199, 200, 201, 202, 204, 205, 206, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 253, 254, 255, 256, 257, 259, 260, 261, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 540, 541, 542, 543, 555, 556, 558, 561, 564, 565, 568, 571, 582, 584, 592, 603, 606, 609, 611, 612, 623, 627, 628, 632, 633, 634, 635, 639, 650, 651, 652, 653, 654, 665, 666, 668, 670, 673, 674, 675, 677, 678, 679, 680, 681, 682, 748
./pallets/creditcoin/src/migrations/mod.rs: 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 31, 32, 34, 35, 36, 37, 39, 40
./pallets/creditcoin/src/migrations/v4.rs: 12
./pallets/creditcoin/src/mock.rs: 464, 465, 466, 467, 468, 469, 470
./pallets/creditcoin/src/ocw.rs: 68, 69
./pallets/creditcoin/src/ocw/errors.rs: 20
./pallets/creditcoin/src/ocw/rpc.rs: 43, 49, 50, 51, 94, 95, 96, 97, 98, 99, 100, 101, 120, 121, 122, 133, 137, 138, 139, 140, 141, 142, 161, 162, 163, 164, 178, 179, 180, 181, 285
./pallets/creditcoin/src/ocw/tasks.rs: 93
./pallets/creditcoin/src/ocw/tasks/collect_coins.rs: 74, 75, 80, 81, 86, 174, 438, 514, 658
./pallets/creditcoin/src/ocw/tasks/verify_transfer.rs: 75, 80, 86, 92, 98, 174
./pallets/creditcoin/src/ocw/tests.rs: 75, 344, 454, 461, 468, 491, 584, 600, 626, 652, 701, 711, 720, 920
./pallets/creditcoin/src/tests.rs: 33, 34, 35, 64, 86, 291, 360, 1387, 1396, 2310, 2318, 2509, 2550
./pallets/creditcoin/src/types.rs: 37, 54, 55, 61, 74, 90, 100, 118, 128, 140, 152, 164, 176, 194, 199, 204, 209, 220, 221, 226, 234, 239, 244, 248, 249, 250, 251, 252, 253, 254, 255, 256, 276, 277, 278, 279, 281, 282, 317, 318, 319, 320, 321, 322, 323, 434, 435, 436, 437, 439, 444, 453, 454, 455, 536, 543, 544, 545, 546, 547, 548, 549, 550, 551, 556, 557, 558, 559, 560, 561, 562, 566, 588, 606, 631, 632, 637, 638
./pallets/creditcoin/src/types/bounded_serde.rs: 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 24, 25, 26, 28, 29, 30, 32, 33, 34
./pallets/creditcoin/src/types/loan_terms.rs: 12, 23, 24, 25, 39, 47, 57, 66, 78, 111, 135, 136, 137, 139, 140, 141
./pallets/creditcoin/src/types/platform.rs: 12, 23, 24, 25, 30, 36, 37, 44, 45, 48, 51, 52, 53, 65, 72, 78, 79, 85, 86
./pallets/difficulty/src/lib.rs: 21, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 101, 102, 103, 105, 106, 107, 109, 110, 112, 113, 114, 221, 222, 223
./pallets/rewards/src/lib.rs: 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 75, 80, 84, 87, 88, 94, 95, 96, 112, 113
./primitives/src/lib.rs: 12, 18, 19, 20, 22, 23, 24, 26, 27, 28, 30, 31, 32, 34, 35, 36, 45, 47, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 61, 63
./runtime/src/lib.rs: 105, 106, 107, 229, 230, 231, 232, 233, 234, 235, 239, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 312, 313, 314, 315, 316, 318, 320, 321, 322, 323, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533
./sha3pow/src/lib.rs: 17, 18, 19, 20, 21, 22, 26, 35, 43, 44, 45, 46, 47, 57, 58, 59, 65, 66, 67, 78, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 133, 134, 135, 136, 137, 138, 139, 141, 143

Copy link
Collaborator

@atodorov atodorov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

pallets/creditcoin/src/lib.rs Show resolved Hide resolved
@CAGS295 CAGS295 merged commit 0323d87 into dev Jul 13, 2022
@CAGS295 CAGS295 deleted the feature/CSUB-202-3 branch July 13, 2022 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants