Skip to content
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

R4R: Allow --from to be a name or an address #2073

Merged
merged 16 commits into from
Sep 25, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/develop' into issue-1735
  • Loading branch information
mslipper committed Sep 9, 2018
commit a24beaeb0ae19ed419082725344da01a04450ea1
12 changes: 8 additions & 4 deletions PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ BREAKING CHANGES
* [x/stake, x/slashing] [#1305](https://github.com/cosmos/cosmos-sdk/issues/1305) - Rename "revoked" to "jailed"
* [x/stake] [#1676] Revoked and jailed validators put into the unbonding state
* [x/stake] [#1877] Redelegations/unbonding-delegation from unbonding validator have reduced time
* [x/stake] [\#2040](https://github.com/cosmos/cosmos-sdk/issues/2040) Validator operator type has now changed to `sdk.ValAddress`
* A new bech32 prefix has been introduced for Tendermint signing keys and
addresses, `cosmosconspub` and `cosmoscons` respectively.
* [x/gov] \#2195 Made governance use BFT Time instead of Block Heights for deposit and voting periods.
* [x/stake] [\#2040](https://github.com/cosmos/cosmos-sdk/issues/2040) Validator
operator type has now changed to `sdk.ValAddress`
* [x/stake] [\#2221](https://github.com/cosmos/cosmos-sdk/issues/2221) New
Bech32 prefixes have been introduced for a validator's consensus address and
public key: `cosmosvalcons` and `cosmosvalconspub` respectively. Also, existing Bech32 prefixes have been
renamed for accounts and validator operators:
* `cosmosaccaddr` / `cosmosaccpub` => `cosmos` / `cosmospub`
* `cosmosvaladdr` / `cosmosvalpub` => `cosmosvaloper` / `cosmosvaloperpub`

* SDK
* [core] [\#1807](https://github.com/cosmos/cosmos-sdk/issues/1807) Switch from use of rational to decimal
Expand Down
14 changes: 5 additions & 9 deletions client/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func SendTx(txBldr authtxb.TxBuilder, cliCtx context.CLIContext, msgs []sdk.Msg)

autogas := cliCtx.DryRun || (cliCtx.Gas == 0)
if autogas {
txCtx, err = EnrichCtxWithGas(txCtx, cliCtx, name, msgs)
txBldr, err = EnrichCtxWithGas(txBldr, cliCtx, cliCtx.FromAddressName, msgs)
if err != nil {
return err
}
Expand All @@ -48,7 +48,7 @@ func SendTx(txBldr authtxb.TxBuilder, cliCtx context.CLIContext, msgs []sdk.Msg)
}

// build and sign the transaction
txBytes, err := txCtx.BuildAndSign(name, passphrase, msgs)
txBytes, err := txBldr.BuildAndSign(cliCtx.FromAddressName, passphrase, msgs)
if err != nil {
return err
}
Expand Down Expand Up @@ -200,18 +200,14 @@ func buildUnsignedStdTx(txBldr authtxb.TxBuilder, cliCtx context.CLIContext, msg
if err != nil {
return
}
if txCtx.Gas == 0 {
if txBldr.Gas == 0 {
var name string
name, err = cliCtx.GetFromName()
if err != nil {
return
}
txCtx, err = EnrichCtxWithGas(txCtx, cliCtx, name, msgs)
txBldr, err = EnrichCtxWithGas(txBldr, cliCtx, cliCtx.FromAddressName, msgs)
if err != nil {
return
}
fmt.Fprintf(os.Stderr, "estimated gas = %v\n", txBldr.Gas)
}
}
stdSignMsg, err := txBldr.Build(msgs)
if err != nil {
return
Expand Down
2 changes: 1 addition & 1 deletion x/ibc/client/cli/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (c relayCommander) refine(bz []byte, sequence int64, passphrase string) []b
panic(err)
}

res, err := txCtx.BuildAndSign(name, passphrase, []sdk.Msg{msg})
res, err := txBldr.BuildAndSign(name, passphrase, []sdk.Msg{msg})
if err != nil {
panic(err)
}
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.