paritytech / substrate

Substrate: The platform for blockchain innovators
Apache License 2.0
8.39k stars 2.65k forks source link

Default Config is not able to provide defaults for types that access other associated types #14473

Closed gupnik closed 1 year ago

gupnik commented 1 year ago

Seems like this is an issue with derive_impl. I see this error when I try to remove pallet::no_default: the trait bound `Self: pallet::Config` is not satisfied. CC: @sam0x17

_Originally posted by @gupnik in https://github.com/paritytech/substrate/pull/14437#discussion_r1244667598_

gupnik commented 1 year ago

As an example, BlockHashCount when retrieved from Block leads to this error.

bkchr commented 1 year ago

Already tracked in this issue: https://github.com/paritytech/polkadot-sdk/issues/171

sam0x17 commented 1 year ago

potential solution here: https://github.com/paritytech/substrate/pull/14437#discussion_r1251861668