cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.24k stars 3.61k forks source link

Does AppTx name not get used for any kind of registration? #112

Closed rigelrozanski closed 7 years ago

rigelrozanski commented 7 years ago

https://github.com/tendermint/basecoin/blob/master/types/tx.go#L198 I'm wondering if the name field is used for anything besides printing response information back to the CLI. if this is the case maybe we can figure out a way to eliminate it, or label its function more clearly. I was under the impression that app txs need to be registered in some capacity and this name would invoke looking up a certain command or registered transaction.

ethanfrey commented 7 years ago

Yeah, when an apptx comes in, the executor looks for a registered plugin with that name. Then passes the data to that plugin.

So, you need to register the plugin with a name and the apptx better have the same name as the plugin