Skip to content

Commit

Permalink
Merge pull request #115 from euforic/fix/govetwarnings
Browse files Browse the repository at this point in the history
fix go vet errors and warnings
  • Loading branch information
maoueh authored Apr 3, 2019
2 parents bba565e + 94e1979 commit 229d589
Show file tree
Hide file tree
Showing 13 changed files with 176 additions and 147 deletions.
2 changes: 1 addition & 1 deletion btcsuite/btcd/btcec/btcec.go
Original file line number Diff line number Diff line change
Expand Up @@ -955,4 +955,4 @@ func initS256() {
func S256() *KoblitzCurve {
initonce.Do(initAll)
return &secp256k1
}
}
252 changes: 126 additions & 126 deletions btcsuite/btcd/btcec/btcec_test.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example_api_transfer_eos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/eoscanada/eos-go/token"
)

func ExampleAPI_Transfer_EOS() {
func ExampleAPI_PushTransaction_transfer_EOS() {
api := eos.New(getAPIURL())

keyBag := &eos.KeyBag{}
Expand Down
2 changes: 1 addition & 1 deletion example_trx_unpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
eos "github.com/eoscanada/eos-go"
)

func ExampleTrx_Unpack() {
func ExamplePackedTransaction_Unpack() {
var packedTrx *eos.PackedTransaction
err := json.Unmarshal(packedTrxData(), &packedTrx)
if err != nil {
Expand Down
3 changes: 0 additions & 3 deletions p2p/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func (r *Relay) startProxy(conn net.Conn) {
}

func (r *Relay) Start() error {

for {
ln, err := net.Listen("tcp", r.listeningAddress)
if err != nil {
Expand All @@ -88,6 +87,4 @@ func (r *Relay) Start() error {
go r.startProxy(conn)
}
}

return nil
}
7 changes: 3 additions & 4 deletions responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ type InfoResp struct {

type BlockResp struct {
SignedBlock
ID Checksum256 `json:"id"`
BlockNum uint32 `json:"block_num"`
RefBlockPrefix uint32 `json:"ref_block_prefix"`
BlockExtensions []*Extension `json:"block_extensions"`
ID Checksum256 `json:"id"`
BlockNum uint32 `json:"block_num"`
RefBlockPrefix uint32 `json:"ref_block_prefix"`
}

type ScheduledTransactionsResp struct {
Expand Down
5 changes: 4 additions & 1 deletion system/linkauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ func NewLinkAuth(account, code eos.AccountName, actionName eos.ActionName, requi
Account: AN("eosio"),
Name: ActN("linkauth"),
Authorization: []eos.PermissionLevel{
{account, eos.PermissionName("active")},
{
Actor: account,
Permission: eos.PermissionName("active"),
},
},
ActionData: eos.NewActionData(LinkAuth{
Account: account,
Expand Down
20 changes: 16 additions & 4 deletions system/newaccount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ func TestActionNewAccount(t *testing.T) {
Account: eos.AccountName("eosio"),
Name: eos.ActionName("newaccount"),
Authorization: []eos.PermissionLevel{
{eos.AccountName("eosio"), eos.PermissionName("active")},
{
Actor: eos.AccountName("eosio"),
Permission: eos.PermissionName("active"),
},
},
ActionData: eos.NewActionData(NewAccount{
Creator: eos.AccountName("eosio"),
Expand Down Expand Up @@ -78,7 +81,10 @@ func TestMarshalTransactionAndSigned(t *testing.T) {
Account: eos.AccountName("eosio"),
Name: eos.ActionName("newaccount"),
Authorization: []eos.PermissionLevel{
{eos.AccountName("eosio"), eos.PermissionName("active")},
{
Actor: eos.AccountName("eosio"),
Permission: eos.PermissionName("active"),
},
},
ActionData: eos.NewActionData(NewAccount{
Creator: eos.AccountName("eosio"),
Expand Down Expand Up @@ -109,7 +115,10 @@ func TestMarshalTransactionAndPack(t *testing.T) {
Account: eos.AccountName("eosio"),
Name: eos.ActionName("newaccount"),
Authorization: []eos.PermissionLevel{
{eos.AccountName("eosio"), eos.PermissionName("active")},
{
Actor: eos.AccountName("eosio"),
Permission: eos.PermissionName("active"),
},
},
ActionData: eos.NewActionData(NewAccount{
Creator: eos.AccountName("eosio"),
Expand All @@ -120,7 +129,10 @@ func TestMarshalTransactionAndPack(t *testing.T) {
Account: eos.AccountName("eosio"),
Name: eos.ActionName("transfer"),
Authorization: []eos.PermissionLevel{
{eos.AccountName("eosio"), eos.PermissionName("active")},
{
Actor: eos.AccountName("eosio"),
Permission: eos.PermissionName("active"),
},
},
ActionData: eos.NewActionData(NewAccount{
Creator: eos.AccountName("eosio"),
Expand Down
10 changes: 8 additions & 2 deletions system/setcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ func NewSetCode(account eos.AccountName, wasmPath string) (out *eos.Action, err
Account: AN("eosio"),
Name: ActN("setcode"),
Authorization: []eos.PermissionLevel{
{account, eos.PermissionName("active")},
{
Actor: account,
Permission: eos.PermissionName("active"),
},
},
ActionData: eos.NewActionData(SetCode{
Account: account,
Expand Down Expand Up @@ -66,7 +69,10 @@ func NewSetABI(account eos.AccountName, abiPath string) (out *eos.Action, err er
Account: AN("eosio"),
Name: ActN("setabi"),
Authorization: []eos.PermissionLevel{
{account, eos.PermissionName("active")},
{
Actor: account,
Permission: eos.PermissionName("active"),
},
},
ActionData: eos.NewActionData(SetABI{
Account: account,
Expand Down
5 changes: 4 additions & 1 deletion system/setram.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ func NewSetRAM(maxRAMSize uint64) *eos.Action {
Account: AN("eosio"),
Name: ActN("setram"),
Authorization: []eos.PermissionLevel{
{AN("eosio"), eos.PermissionName("active")},
{
Actor: AN("eosio"),
Permission: eos.PermissionName("active"),
},
},
ActionData: eos.NewActionData(SetRAM{
MaxRAMSize: eos.Uint64(maxRAMSize),
Expand Down
5 changes: 4 additions & 1 deletion system/setramrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ func NewSetRAMRate(bytesPerBlock uint16) *eos.Action {
Account: AN("eosio"),
Name: ActN("setram"),
Authorization: []eos.PermissionLevel{
{AN("eosio"), eos.PermissionName("active")},
{
Actor: AN("eosio"),
Permission: eos.PermissionName("active"),
},
},
ActionData: eos.NewActionData(SetRAMRate{
BytesPerBlock: bytesPerBlock,
Expand Down
5 changes: 4 additions & 1 deletion system/unlinkauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ func NewUnlinkAuth(account, code eos.AccountName, actionName eos.ActionName) *eo
Account: AN("eosio"),
Name: ActN("unlinkauth"),
Authorization: []eos.PermissionLevel{
{account, eos.PermissionName("active")},
{
Actor: account,
Permission: eos.PermissionName("active"),
},
},
ActionData: eos.NewActionData(UnlinkAuth{
Account: account,
Expand Down
5 changes: 4 additions & 1 deletion system/updateauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ func NewUpdateAuth(account eos.AccountName, permission, parent eos.PermissionNam
Account: AN("eosio"),
Name: ActN("updateauth"),
Authorization: []eos.PermissionLevel{
{account, usingPermission},
{
Actor: account,
Permission: usingPermission,
},
},
ActionData: eos.NewActionData(UpdateAuth{
Account: account,
Expand Down

0 comments on commit 229d589

Please sign in to comment.