anonymousGiga / Substrate-homework

0 stars 0 forks source link

测试代码可以优化一下,会更清晰一些 #1

Open ziboilihua opened 2 years ago

ziboilihua commented 2 years ago

https://github.com/anonymousGiga/Substrate-homework/blob/ac85788d0f0060580b6739d7d1491e3993cf467d/Advanced1/substrate-node-template/pallets/poe/src/tests.rs?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L40

let limit = ClaimSizeLimit::get() as usize; assert_noop!( Poe::create_claim( Origin::signed(1), vec![0u8; limit + 1] ), Error::::ClaimSizeOverflow );

anonymousGiga commented 2 years ago

Good suggestion, i'll update it later.

anonymousGiga commented 2 years ago

fixed in https://github.com/anonymousGiga/Substrate-homework/commit/9d12406dc6559b373af3bc345a96ad123917acd5