From 4911db850dd8232e7b8f701f81535d37c24a9b8d Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Thu, 3 May 2018 18:35:12 +0200 Subject: [PATCH] Fix auto-sequencing (closes #950) --- client/context/viper.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/context/viper.go b/client/context/viper.go index 7e82f7ad9..4b3007f12 100644 --- a/client/context/viper.go +++ b/client/context/viper.go @@ -36,7 +36,7 @@ func NewCoreContextFromViper() CoreContext { Sequence: viper.GetInt64(client.FlagSequence), Client: rpc, Decoder: nil, - AccountStore: "main", + AccountStore: "acc", } } @@ -55,7 +55,8 @@ func defaultChainID() (string, error) { // EnsureSequence - automatically set sequence number if none provided func EnsureSequence(ctx CoreContext) (CoreContext, error) { - if viper.IsSet(client.FlagSequence) { + // Should be viper.IsSet, but this does not work - https://github.com/spf13/viper/pull/331 + if viper.GetInt64(client.FlagSequence) != 0 { return ctx, nil } from, err := ctx.GetFromAddress()