Skip to content

Commit

Permalink
Fix bug in liteapi.ConvertBlockchainConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksej-paschenko committed Oct 26, 2023
1 parent d11b848 commit 8a256db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion liteapi/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ func ConvertBlockchainConfig(params tlb.ConfigParams) (*BlockchainConfig, error)
if !field.IsValid() {
continue
}
field.Set(reflect.ValueOf(&item.Value.Value))
cell := boc.NewCell()
if err := tlb.Unmarshal(&item.Value.Value, cell); err != nil {
return nil, err
}
field.Set(reflect.ValueOf(cell))
}
return conf, nil
}
2 changes: 1 addition & 1 deletion liteapi/testdata/config_33651872.json
Original file line number Diff line number Diff line change
Expand Up @@ -7577,5 +7577,5 @@
}
},
"ConfigParamNegative71": "b5ee9c72010212010002c7000181dd24c4a1f2b88f8b7053513b5cc6c5a31bc44b2a72dcb4d8c0338af0f0d37ec52b578443ec10fe8ff0be5ecbbc1413bd04e38ec084a334f6c10bcb5cabaf3c19c001020120020302012004050201580c0d020120060702016e0a0b02014808090081bf5f4002c3f03904f141ee9330c661b9c545414c19c574974434f3cfa78313230c000000000000000000000000642c5955da4edcefdec6329040b0d928401352c50081bedbe7361a959b567d754d7ff7898da8c392282b64117a30ea2a46bcaa45ad5df00000000000000000000000067a53e130c355209c871237d0208ad024a842d5cc0081bec95563c11f2e2045dcac29d4f31aac640dc09d3e16eef3666fc4a944008bc320000000000000000000000000bee558d8a40b087b63d3d4c6781b86e0763825340081befd1296b550ea75c0a499d39252ccf06e189b57e216573cff0ff2b469eae18b80000000000000000000000007fa20fcc44d523aece9d8e31c62cdc2628bcc236c0081bec17ceed487e1f7101d26d72073d3a9906c1673513fb41b5c8d115dacf7e8e2c8000000000000000000000007e2e351680d4c25d4f55be7c3d368b4d54b9060640081bf5fb044e1df9c1dad4abbe20dcfe22120e702418816788b5f19bb61c2ccfb9cfe00000000000000000000000189937b06d571688ca32e6c2cd233c7ac4923c0830201480e0f0081bed287b2e9459c1575386d21dc28c6893457038180ebe260ae6c61c533d8521898000000000000000000000000499b9c34cee399e23506a65f5ed17c2170d63ecc02015810110081be698c32740d31c6bc7d920ffb1d3237c816afa539072190bbc5600de12fc3112000000000000000000000000fe57755829e1e3069cda0433f10ab4bec33fc58900081be44aa9a69d0a78def477f135f34b8a54f4f8ad9866b14e524b7c32f7b9491006000000000000000000000000073e9d10c8657a9e796a0c5f30c3dfde7ed5b4510",
"ConfigParamNegative999": "b5ee9c72010212010002c7000181dd24c4a1f2b88f8b7053513b5cc6c5a31bc44b2a72dcb4d8c0338af0f0d37ec52b578443ec10fe8ff0be5ecbbc1413bd04e38ec084a334f6c10bcb5cabaf3c19c001020120020302012004050201580c0d020120060702016e0a0b02014808090081bf5f4002c3f03904f141ee9330c661b9c545414c19c574974434f3cfa78313230c000000000000000000000000642c5955da4edcefdec6329040b0d928401352c50081bedbe7361a959b567d754d7ff7898da8c392282b64117a30ea2a46bcaa45ad5df00000000000000000000000067a53e130c355209c871237d0208ad024a842d5cc0081bec95563c11f2e2045dcac29d4f31aac640dc09d3e16eef3666fc4a944008bc320000000000000000000000000bee558d8a40b087b63d3d4c6781b86e0763825340081befd1296b550ea75c0a499d39252ccf06e189b57e216573cff0ff2b469eae18b80000000000000000000000007fa20fcc44d523aece9d8e31c62cdc2628bcc236c0081bec17ceed487e1f7101d26d72073d3a9906c1673513fb41b5c8d115dacf7e8e2c8000000000000000000000007e2e351680d4c25d4f55be7c3d368b4d54b9060640081bf5fb044e1df9c1dad4abbe20dcfe22120e702418816788b5f19bb61c2ccfb9cfe00000000000000000000000189937b06d571688ca32e6c2cd233c7ac4923c0830201480e0f0081bed287b2e9459c1575386d21dc28c6893457038180ebe260ae6c61c533d8521898000000000000000000000000499b9c34cee399e23506a65f5ed17c2170d63ecc02015810110081be698c32740d31c6bc7d920ffb1d3237c816afa539072190bbc5600de12fc3112000000000000000000000000fe57755829e1e3069cda0433f10ab4bec33fc58900081be44aa9a69d0a78def477f135f34b8a54f4f8ad9866b14e524b7c32f7b9491006000000000000000000000000073e9d10c8657a9e796a0c5f30c3dfde7ed5b4510"
"ConfigParamNegative999": "b5ee9c72010101010022000040cbb9d1062954439a83a91f27835fb9d2e3e798910356650c3c493c9462346468"
}

0 comments on commit 8a256db

Please sign in to comment.