multi: formatting and comment fixes

This commit is contained in:
Oliver Gugger
2022-02-07 13:58:28 +01:00
parent ffee7d1bcf
commit 895a2e497b
160 changed files with 159 additions and 260 deletions

View File

@@ -63,6 +63,7 @@ func TestDecodeAcceptChannel(t *testing.T) {
if !bytes.Equal(
decoded.UpfrontShutdownScript, encoded.UpfrontShutdownScript,
) {
t.Fatalf("decoded script: %x does not equal encoded script: %x",
decoded.UpfrontShutdownScript, encoded.UpfrontShutdownScript)
}

View File

@@ -60,7 +60,6 @@ func TestExtraOpaqueDataEncodeDecode(t *testing.T) {
// time, we'll actually feed in blank bytes.
quickCfg := &quick.Config{
Values: func(v []reflect.Value, r *rand.Rand) {
var newTestCase testCase
if r.Int31()%2 == 0 {
newTestCase.emptyBytes = true

View File

@@ -89,7 +89,6 @@ func TestFeatureVectorSetUnset(t *testing.T) {
t.Errorf("Expectation failed in case %d, bit %d", i, j)
break
}
}
for _, bit := range test.bits {

View File

@@ -70,7 +70,6 @@ func ErrorPayloadTooLarge(size int) error {
"but maximum message payload is %d bytes",
size, MaxMsgBody,
)
}
// String return the string representation of message type.

View File

@@ -200,7 +200,6 @@ func BenchmarkWriteMessage(b *testing.B) {
m := msg
// Run each message as a sub benchmark test.
b.Run(msg.MsgType().String(), func(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
// Fetch a buffer from the pool and reset it.

View File

@@ -236,7 +236,6 @@ func (o *OpenChannel) Encode(w *bytes.Buffer, pver uint32) error {
if err := WritePublicKey(w, o.HtlcPoint); err != nil {
return err
}
if err := WritePublicKey(w, o.FirstCommitmentPoint); err != nil {

View File

@@ -49,7 +49,6 @@ var (
// TestQueryShortChanIDsUnsorted tests that decoding a QueryShortChanID request
// that contains duplicate or unsorted ids returns an ErrUnsortedSIDs failure.
func TestQueryShortChanIDsUnsorted(t *testing.T) {
for _, test := range unsortedSidTests {
test := test
t.Run(test.name, func(t *testing.T) {