1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Merge pull request #10 from newton-blockchain/EmelyanenkoK-proposal-wins-losses

Fix non-critical bug in config-code
This commit is contained in:
EmelyanenkoK 2021-02-20 17:48:26 +03:00 committed by GitHub
commit ce54f13a75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -601,7 +601,9 @@ _ unpack_proposal(slice pstatus) inline_ref {
voters_list = cons(voter_id, voters_list);
}
} until (~ f);
var (rounds_remaining, losses, wins) = (rest~load_uint(8), rest~load_uint(8), rest~load_uint(8));
;; Note there is a bug in config contract currently deployed in testnet2:
;; wins and losses are messed up
var (rounds_remaining, wins, losses) = (rest~load_uint(8), rest~load_uint(8), rest~load_uint(8));
rest.end_parse();
var (param_id, param_val, param_hash) = parse_config_proposal(proposal);
return [expires, critical?, [param_id, param_val, param_hash], vset_id, voters_list, weight_remaining, rounds_remaining, losses, wins];

View file

@ -16,7 +16,7 @@ begin-options
"Creates a critical parameter change proposal" option-help
"x" "--expires-in" { parse-int =: expire-in } short-long-option-arg
"Sets proposal expiration time in seconds (default " expire-in (.) $+ +")" option-help
"H" "--old-hash" { (hex-number) not abort"256-bit hex number expected as hash" =: old-hash }
"H" "--old-hash" { (hex-number) 1 = not .s abort"256-bit hex number expected as hash" =: old-hash }
short-long-option-arg
"Sets the required cell hash of existing parameter value (0 means no value)" option-help
"h" "--help" { usage } short-long-option