From a55b4dceadf009fa7c3a7ed1049a217ca3eded8c Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Wed, 27 Oct 2021 11:08:18 +0200 Subject: [PATCH] formatting code Signed-off-by: Vincenzo Palazzo --- glightning/lightning_test.go | 12 ++++++------ glightning/plugin.go | 6 +++--- glightning/plugin_test.go | 2 +- glightning/tests/interop_test.go | 2 +- jrpc2/client.go | 1 + 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/glightning/lightning_test.go b/glightning/lightning_test.go index 50b6d05..05b9a43 100644 --- a/glightning/lightning_test.go +++ b/glightning/lightning_test.go @@ -4,8 +4,8 @@ import ( "bufio" "errors" "fmt" - "github.com/niftynei/glightning/glightning" "github.com/stretchr/testify/assert" + "github.com/niftynei/glightning/glightning" "io" "io/ioutil" "net" @@ -262,7 +262,7 @@ func TestListPeers(t *testing.T) { OutPaymentsFulfilled: 123, OutMilliSatoshiFulfilled: 123, OutgoingFulfilledMsat: "123msat", - Htlcs: htlcs, + Htlcs: htlcs, }, }, }, @@ -367,10 +367,10 @@ func TestListPays(t *testing.T) { } assert.Equal(t, []glightning.PaymentFields{ glightning.PaymentFields{ - Bolt11: "lnbcrt100n1pw5mktvpp53a20un076gq93swhnemdmyday8c88kj9yh7d3k66c49narluy0dsdq0vehhygrzd3hk7eqxqyjw5qcqp2zwqux7t9zyelgcuwc535ugs5sylwdh0fu03xrzugu2zzljwvtg3q4xy22u3mhvxx3ag09jyjpx5lxl7lwux5l2mge8r85havpspm09gpnfxxsw", - PaymentPreImage: "c907587348984baf0ae031b286bf1c9427abfa492b254aca67b6809fd9b58d7c", - Status: "complete", - Label: "optional", + Bolt11: "lnbcrt100n1pw5mktvpp53a20un076gq93swhnemdmyday8c88kj9yh7d3k66c49narluy0dsdq0vehhygrzd3hk7eqxqyjw5qcqp2zwqux7t9zyelgcuwc535ugs5sylwdh0fu03xrzugu2zzljwvtg3q4xy22u3mhvxx3ag09jyjpx5lxl7lwux5l2mge8r85havpspm09gpnfxxsw", + PaymentPreImage: "c907587348984baf0ae031b286bf1c9427abfa492b254aca67b6809fd9b58d7c", + Status: "complete", + Label: "optional", AmountSentMilliSatoshi: "10000msat", }, }, forwards) diff --git a/glightning/plugin.go b/glightning/plugin.go index 478d6cc..e79fc2e 100644 --- a/glightning/plugin.go +++ b/glightning/plugin.go @@ -1060,9 +1060,9 @@ func (gm GetManifestMethod) Call() (jrpc2.Result, error) { } type ProxyConf struct { - Type string `json:"type"` + Type string `json:"type"` Address string `json:"address"` - port uint64 `json:"port"` + port uint64 `json:"port"` } type Config struct { @@ -1073,7 +1073,7 @@ type Config struct { Features *FeatureBits `json:"feature_set,omitempty"` Proxy *proxyConf `json:"proxy,omitempty"` TorV3Enabled bool `json:"torv3-enabled,omitempty"` - AlwaysProxy bool `json:"always_use_proxy,omitempty"` + AlwaysProxy bool `json:"always_use_proxy,omitempty"` } type InitMethod struct { diff --git a/glightning/plugin_test.go b/glightning/plugin_test.go index 6088ce6..628575b 100644 --- a/glightning/plugin_test.go +++ b/glightning/plugin_test.go @@ -3,9 +3,9 @@ package glightning_test import ( "bufio" "fmt" + "github.com/stretchr/testify/assert" "github.com/niftynei/glightning/glightning" "github.com/niftynei/glightning/jrpc2" - "github.com/stretchr/testify/assert" "io" "log" "os" diff --git a/glightning/tests/interop_test.go b/glightning/tests/interop_test.go index 152f5ae..342a730 100644 --- a/glightning/tests/interop_test.go +++ b/glightning/tests/interop_test.go @@ -4,9 +4,9 @@ import ( "bufio" "errors" "fmt" + "github.com/stretchr/testify/assert" "github.com/niftynei/glightning/gbitcoin" "github.com/niftynei/glightning/glightning" - "github.com/stretchr/testify/assert" "io" "io/ioutil" "log" diff --git a/jrpc2/client.go b/jrpc2/client.go index 2d25c76..7875327 100644 --- a/jrpc2/client.go +++ b/jrpc2/client.go @@ -6,6 +6,7 @@ import ( "fmt" "io" "log" + "math" "net" "os" "sync"