channeldb+lnwire: rename MsgFundingLocked to MsgChannelReady

This commit is created by running,

```shell
gofmt -d -w -r 'MsgFundingLocked -> MsgChannelReady' .

gco master channeldb/migration
```
This commit is contained in:
yyforyongyu
2023-03-16 04:44:15 +08:00
parent 1b7c56b2ed
commit c8e8358918
4 changed files with 7 additions and 7 deletions

View File

@@ -111,5 +111,5 @@ func (c *ChannelReady) Encode(w *bytes.Buffer, pver uint32) error {
//
// This is part of the lnwire.Message interface.
func (c *ChannelReady) MsgType() MessageType {
return MsgFundingLocked
return MsgChannelReady
}

View File

@@ -289,7 +289,7 @@ func FuzzFundingCreated(f *testing.F) {
func FuzzFundingLocked(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgFundingLocked.
data = prefixWithMsgType(data, MsgFundingLocked)
data = prefixWithMsgType(data, MsgChannelReady)
// Pass the message into our general fuzz harness for wire
// messages!

View File

@@ -566,7 +566,7 @@ func TestLightningWireProtocol(t *testing.T) {
v[0] = reflect.ValueOf(req)
},
MsgFundingLocked: func(v []reflect.Value, r *rand.Rand) {
MsgChannelReady: func(v []reflect.Value, r *rand.Rand) {
var c [32]byte
if _, err := r.Read(c[:]); err != nil {
@@ -1013,7 +1013,7 @@ func TestLightningWireProtocol(t *testing.T) {
},
},
{
msgType: MsgFundingLocked,
msgType: MsgChannelReady,
scenario: func(m ChannelReady) bool {
return mainScenario(&m)
},

View File

@@ -31,7 +31,7 @@ const (
MsgAcceptChannel = 33
MsgFundingCreated = 34
MsgFundingSigned = 35
MsgFundingLocked = 36
MsgChannelReady = 36
MsgShutdown = 38
MsgClosingSigned = 39
MsgUpdateAddHTLC = 128
@@ -88,7 +88,7 @@ func (t MessageType) String() string {
return "MsgFundingCreated"
case MsgFundingSigned:
return "MsgFundingSigned"
case MsgFundingLocked:
case MsgChannelReady:
return "FundingLocked"
case MsgShutdown:
return "Shutdown"
@@ -190,7 +190,7 @@ func makeEmptyMessage(msgType MessageType) (Message, error) {
msg = &FundingCreated{}
case MsgFundingSigned:
msg = &FundingSigned{}
case MsgFundingLocked:
case MsgChannelReady:
msg = &ChannelReady{}
case MsgShutdown:
msg = &Shutdown{}