-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI Updates, Coin fix #26
Conversation
b2e596f
to
4699f33
Compare
78f36dd
to
a83801c
Compare
cmd/commands/query.go
Outdated
@@ -66,6 +66,11 @@ var ( | |||
} | |||
) | |||
|
|||
// Register a subcommand of TxCmd to craft transactions for plugins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix comment
cmd/commands/utils.go
Outdated
@@ -35,6 +39,46 @@ func StripHex(s string) string { | |||
return s | |||
} | |||
|
|||
func ParseCoin(str string) (types.Coin, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix so ParseCoins calls ParseCoin, not the other way round
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
roger
@@ -58,7 +102,7 @@ func Query(tmAddr string, key []byte) (*abci.ResponseQuery, error) { | |||
// fetch the account by querying the app | |||
func getAcc(tmAddr string, address []byte) (*types.Account, error) { | |||
|
|||
key := append([]byte("base/a/"), address...) | |||
key := state.AccountKey(address) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
@@ -69,12 +69,12 @@ func (ep *ExamplePlugin) RunTx(store types.KVStore, ctx types.CallContext, txByt | |||
return abci.OK | |||
} | |||
|
|||
func (ep *ExamplePlugin) InitChain(store types.KVStore, vals []*abci.Validator) { | |||
func (cp *ExamplePlugin) InitChain(store types.KVStore, vals []*abci.Validator) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cp
? let's keep it ep
for this example plugin. Thanks for fixing the methods though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
Great stuff. Do the guides need to be updated for the new coins format though? Can you add that here? |
@ebuchman Yes I will investigate / update the guides for the new CLI format |
5961056
to
49c3ab0
Compare
Can we change all the Also, can we get some simple tests for the ParseCoin? |
whoops
b8a94f7
to
6a21ad5
Compare
hd: optimize ReverseBytes + add tests
closes #24
closes #27
added query subcommand register
modified the CLI to allow for multiple coin types sending to the transaction
fix Coin.IsGTE logic