Merge PR #3970: Fix Tx Sign Offline Mode

- Add shorthand flags `-a` and `-s` for the account and sequence numbers respectively
- Mark the account and sequence numbers required during "offline" mode
- Always do an RPC query for account and sequence number during "online" mode
  - If clients wish to provide such values, they must use `--offline`. This makes the whole flow/UX easier to reason about.

closes: #3893
This commit is contained in:
Alexander Bezobchuk
2019-03-26 10:36:10 -04:00
committed by GitHub
parent 83f3d1e192
commit ea46da7126
6 changed files with 58 additions and 45 deletions
+1 -1
View File
@@ -245,7 +245,7 @@ func (bldr TxBuilder) BuildTxForSim(msgs []sdk.Msg) ([]byte, error) {
return bldr.txEncoder(auth.NewStdTx(signMsg.Msgs, signMsg.Fee, sigs, signMsg.Memo))
}
// SignStdTx appends a signature to a StdTx and returns a copy of a it. If append
// SignStdTx appends a signature to a StdTx and returns a copy of it. If append
// is false, it replaces the signatures already attached with the new signature.
func (bldr TxBuilder) SignStdTx(name, passphrase string, stdTx auth.StdTx, appendSig bool) (signedStdTx auth.StdTx, err error) {
stdSignature, err := MakeSignature(bldr.keybase, name, passphrase, StdSignMsg{