From 6df9fddf7c22ae991404af0341f596e8f02057c2 Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Sun, 13 May 2018 12:35:28 -0400 Subject: [PATCH 1/3] Sharding: fix error msg Former-commit-id: 6b79f8caeb23aa405180a8f776eabdacbf35f765 [formerly e5d0d702cc93fbd3c13e0abf09606c82a37734ab] Former-commit-id: 325a592978a92840d74844fae594bc927da8af4b --- sharding/notary/notary.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharding/notary/notary.go b/sharding/notary/notary.go index 1922ccadc..dd428e97a 100644 --- a/sharding/notary/notary.go +++ b/sharding/notary/notary.go @@ -137,7 +137,7 @@ func submitCollation(shardID int64) error { // into contract. func joinNotaryPool(c client.Client) error { if !c.DepositFlagSet() { - return errors.New("join notary pool called when deposit flag was not set") + return errors.New("joinNotaryPool called when deposit flag was not set") } log.Info("Joining notary pool") From ce900f9bd7ad3819aae7ed8879b629782aeb1ea1 Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Sun, 13 May 2018 12:37:58 -0400 Subject: [PATCH 2/3] Sharding: check flag value Former-commit-id: f1bd210017d236d1ebafdd9b404be6b4731c75ed [formerly adc011704641d4830e6e46acbc6b33c2eb06ba92] Former-commit-id: 0071f67a01cff53eaa8ba8a888aecc16f9150b8d --- sharding/client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharding/client/client.go b/sharding/client/client.go index 0b4b5735a..e0fcd2389 100644 --- a/sharding/client/client.go +++ b/sharding/client/client.go @@ -242,5 +242,5 @@ func initSMC(c *shardingClient) (*contracts.SMC, error) { } func (c *shardingClient) DepositFlagSet() bool { - return false + return c.ctx.GlobalBool(utils.DepositFlag.Name) } From f1d8accaeb2eec70bb7f3cf5d9abfdf6eb36b9ca Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Sun, 13 May 2018 13:21:21 -0400 Subject: [PATCH 3/3] Sharding: added function doc Former-commit-id: 0c20f0ed1c23a9b72620db14470239f71775ab82 [formerly 57d3964723de6bbd16dfc289730665aab89b60e8] Former-commit-id: 83cb53bfc1eca388184d2d72910831d11181f14c --- sharding/client/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/sharding/client/client.go b/sharding/client/client.go index e0fcd2389..769ce50dd 100644 --- a/sharding/client/client.go +++ b/sharding/client/client.go @@ -241,6 +241,7 @@ func initSMC(c *shardingClient) (*contracts.SMC, error) { return contract, nil } +// DepositFlagSet returns true for cli flag --deposit. func (c *shardingClient) DepositFlagSet() bool { return c.ctx.GlobalBool(utils.DepositFlag.Name) }