From 8d01b0518a12b36f7a054ed2e4f5e9be10b66e66 Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Mon, 2 Apr 2018 22:26:29 -0400 Subject: [PATCH] sharding: s/CreateTXOps/CreateTXOpts/g Former-commit-id: 72f0620c7de05caf26bc6316b886d7ee063b45aa [formerly 7adad0ddfad8bc2555579a1bf5bdf46bb8d575ec] Former-commit-id: 127e5f89dd4fda27f84bf626c30de86551392bab --- sharding/client/client.go | 8 ++++---- sharding/collator/collator.go | 2 +- sharding/collator/collator_test.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sharding/client/client.go b/sharding/client/client.go index 7affcfb47..0ff634c38 100644 --- a/sharding/client/client.go +++ b/sharding/client/client.go @@ -47,7 +47,7 @@ type shardingClient struct { type Client interface { Start() error Close() - CreateTXOps(*big.Int) (*bind.TransactOpts, error) + CreateTXOpts(*big.Int) (*bind.TransactOpts, error) ChainReader() ethereum.ChainReader Account() *accounts.Account SMCCaller() *contracts.SMCCaller @@ -145,8 +145,8 @@ func (c *shardingClient) unlockAccount(account accounts.Account) error { return c.keystore.Unlock(account, pass) } -// CreateTXOps creates a *TransactOpts with a signer using the default account on the keystore. -func (c *shardingClient) CreateTXOps(value *big.Int) (*bind.TransactOpts, error) { +// CreateTXOpts creates a *TransactOpts with a signer using the default account on the keystore. +func (c *shardingClient) CreateTXOpts(value *big.Int) (*bind.TransactOpts, error) { account := c.Account() return &bind.TransactOpts{ @@ -210,7 +210,7 @@ func initSMC(c *shardingClient) (*contracts.SMC, error) { if len(b) == 0 { log.Info(fmt.Sprintf("No sharding manager contract found at %s. Deploying new contract.", sharding.ShardingManagerAddress.String())) - txOps, err := c.CreateTXOps(big.NewInt(0)) + txOps, err := c.CreateTXOpts(big.NewInt(0)) if err != nil { return nil, fmt.Errorf("unable to intiate the transaction: %v", err) } diff --git a/sharding/collator/collator.go b/sharding/collator/collator.go index 97e5bd7b4..1d25315a3 100644 --- a/sharding/collator/collator.go +++ b/sharding/collator/collator.go @@ -127,7 +127,7 @@ func submitCollation(shardID int64) error { func joinCollatorPool(c client.Client) error { log.Info("Joining collator pool") - txOps, err := c.CreateTXOps(sharding.CollatorDeposit) + txOps, err := c.CreateTXOpts(sharding.CollatorDeposit) if err != nil { return fmt.Errorf("unable to intiate the deposit transaction: %v", err) } diff --git a/sharding/collator/collator_test.go b/sharding/collator/collator_test.go index 73e72921a..5dea4827b 100644 --- a/sharding/collator/collator_test.go +++ b/sharding/collator/collator_test.go @@ -43,7 +43,7 @@ func (m *mockClient) SMCTransactor() *contracts.SMCTransactor { return &m.smc.SMCTransactor } -func (m *mockClient) CreateTXOps(value *big.Int) (*bind.TransactOpts, error) { +func (m *mockClient) CreateTXOpts(value *big.Int) (*bind.TransactOpts, error) { txOpts := transactOpts() txOpts.Value = value return txOpts, nil